autowisp.tests.test_provenance_resolver module

Class Inheritance Diagram

Inheritance diagram of AutoWISPTestCase, Evaluator, NoResultFound, TestProvenanceResolver

Unit tests for autowisp.database.provenance_resolver.

class autowisp.tests.test_provenance_resolver.TestProvenanceResolver(methodName='runTest')[source]

Bases: AutoWISPTestCase

Inheritance diagram of autowisp.tests.test_provenance_resolver.TestProvenanceResolver

Unit tests for get_or_create_observing_session.

test_missing_survey_row_raises()[source]

Resolver raises NoResultFound when a survey row is missing.

Equivalent to the wisp-survey import step having been skipped: the matching ORM row simply isn’t there. Use an unknown camera serial to trigger the same failure mode without tearing down the rest of the survey DB.

test_resolves_existing_survey_rows()[source]

Resolver builds an ObservingSession from imported survey rows.

autowisp.tests.test_provenance_resolver._make_configuration()[source]

Return a step configuration mirroring test.cfg’s provenance fields.

autowisp.tests.test_provenance_resolver._make_header(**overrides)[source]

Build a fake FITS-header dict matching the test survey configuration.

Keys mirror the header expressions in test.cfg; values match the rows imported from survey_instruments.json by AutoWISPTestCase.setUp().