ingest.test package¶
Subpackages¶
Submodules¶
ingest.test.test_app module¶
-
class
ingest.test.test_app.TestIngestJobType(methodName='runTest')¶ Bases:
django.test.testcases.TestCaseTests things related to the ingest job type
-
fixtures= [u'basic_errors.json', u'basic_job_errors.json', u'ingest_job_types.json', u'ingest_errors.json']¶
-
setUp()¶
-
test_timed_out_system_job_task()¶ Tests running through a job execution where a system job task times out
-
ingest.test.test_ingest_job module¶
ingest.test.test_models module¶
-
class
ingest.test.test_models.TestIngestAddDataTypeTag(methodName='runTest')¶ Bases:
django.test.testcases.TestCase-
setUp()¶
-
test_same_tag()¶ Tests calling add_data_type_tag() with the same tag twice
-
test_valid()¶ Tests calling add_data_type_tag() with valid tags
-
-
class
ingest.test.test_models.TestIngestGetDataTypeTags(methodName='runTest')¶ Bases:
django.test.testcases.TestCase-
setUp()¶
Tests calling get_data_type_tags() with no tags
Tests calling get_data_type_tags() with tags
-
-
class
ingest.test.test_models.TestStrikeManagerCreateStrikeProcess(methodName='runTest')¶ Bases:
django.test.testcases.TransactionTestCase-
fixtures= [u'ingest_job_types.json']¶
-
setUp()¶
-
test_successful_v6(*args, **keywargs)¶ Tests calling StrikeManager.create_strike successfully with v6 config
-
test_update_strike(*args, **keywargs)¶ Tests calling StrikeManager.create_strike successfully with v6 config
-
ingest.test.test_views module¶
-
class
ingest.test.test_views.TestIngestDetailsViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCase-
fixtures= [u'ingest_job_types.json']¶
-
setUp()¶
-
test_id()¶ Tests successfully calling the ingests view by id.
-
test_missing()¶ Tests calling the ingests view with an invalid id or file name.
-
version= u'v6'¶
-
-
class
ingest.test.test_views.TestIngestStatusViewV6(methodName='runTest')¶ Bases:
django.test.testcases.TestCase-
fixtures= [u'ingest_job_types.json']¶
-
setUp()¶
-
test_a_lot_of_ingests()¶
-
test_dont_fill_empty_slots()¶ Tests successfully calling the ingest status view ensuring no place holder zero values when no data exists.
-
test_multiple_strikes()¶ Tests successfully calling the ingest status view with multiple strike process groupings.
-
test_successful()¶ Tests successfully calling the ingest status view.
-
test_time_range()¶ Tests successfully calling the ingest status view with a time range filter.
-
test_use_ingest_time()¶ Tests successfully calling the ingest status view grouped by ingest time instead of data time.
-
version= u'v6'¶
-
-
class
ingest.test.test_views.TestIngestsViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCase-
fixtures= [u'ingest_job_types.json']¶
-
setUp()¶
-
test_file_name()¶ Tests successfully calling the ingests view filtered by file name.
-
test_scan_id()¶ Tests successfully calling the ingests view filtered by scan processor.
-
test_status()¶ Tests successfully calling the ingests view filtered by status.
-
test_strike_id()¶ Tests successfully calling the ingests view filtered by strike processor.
-
test_successful()¶ Tests successfully calling the ingests view.
-
version= u'v6'¶
-
-
class
ingest.test.test_views.TestScanCreateViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCase-
api= u'v6'¶
-
fixtures= [u'ingest_job_types.json']¶
-
setUp()¶
-
test_configuration_bad_type()¶ Tests calling the create Scan view with configuration that is not a dict.
-
test_invalid_configuration()¶ Tests calling the create Scan view with invalid configuration.
-
test_missing_configuration()¶ Tests calling the create Scan view with missing configuration.
-
test_successful()¶ Tests calling the create Scan view successfully.
-
test_successful_v6()¶ Tests calling the create Scan view successfully.
-
-
class
ingest.test.test_views.TestScanDetailsViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCase-
api= u'v6'¶
-
setUp()¶
-
test_edit_bad_config()¶ Tests attempting to edit a Scan process using an invalid configuration
-
test_edit_bad_recipe()¶ Tests editing a scan configuration with an invalid recipe
-
test_edit_config()¶ Tests editing the configuration of a Scan process
-
test_edit_config_conflict()¶ Tests editing the configuration of a Scan process already launched
-
test_edit_config_v6()¶ Tests successfully editing an existing scan
-
test_edit_not_found()¶ Tests editing non-existent Scan process
-
test_edit_simple()¶ Tests editing only the basic attributes of a Scan process
-
test_not_found()¶ Tests successfully calling the get Scan process details view with a model id that does not exist.
-
test_successful()¶ Tests successfully calling the get Scan process details view.
-
-
class
ingest.test.test_views.TestScansProcessViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCase-
api= u'v6'¶
-
fixtures= [u'ingest_job_types.json']¶
-
setUp()¶
-
test_cancel_scan_broken_ingest_job(*args, **keywargs)¶ Tests no cancel messages generated when jobs are not in a cancelable state
-
test_cancel_scan_job(*args, **keywargs)¶ Tests successfully calling the Scan process view for an ingest Scan. following dry run
-
test_cancel_scan_job_nothing_to_cancel(*args, **keywargs)¶ Tests no cancel messages generated when jobs are not in a cancelable state
-
test_dry_run_process(*args, **keywargs)¶ Tests successfully calling the Scan process view for a dry run Scan.
-
test_dry_run_process_conflict()¶ Tests error response when calling the Scan process view for a dry run Scan when already processed.
-
test_dry_run_process_reprocess(*args, **keywargs)¶ Tests successfully calling the Scan process view for a 2nd dry run Scan.
-
test_ingest_after_dry_run(*args, **keywargs)¶ Tests successfully calling the Scan process view for an ingest Scan. following dry run
-
test_ingest_process(*args, **keywargs)¶ Tests successfully calling the Scan process view for an ingest Scan.
-
test_ingest_process_conflict()¶ Tests error response when calling the Scan process view for an ingest Scan when already processed.
-
test_not_found()¶ Tests a Scan process launch where the id of Scan is missing.
-
-
class
ingest.test.test_views.TestScansValidationViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCaseTests related to the Scan process validation endpoint
-
api= u'v6'¶
-
setUp()¶
-
test_configuration_bad_type()¶ Tests validating a new Scan process with configuration that is not a dict.
-
test_invalid_configuration()¶ Tests validating a new Scan process with invalid configuration.
-
test_missing_configuration()¶ Tests validating a new Scan process with missing configuration.
-
test_successful()¶ Tests validating a new Scan process.
-
test_successful_recipe()¶ Tests validating a new Scan process.
-
-
class
ingest.test.test_views.TestScansViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCase-
api= u'v6'¶
-
setUp()¶
-
test_name()¶ Tests successfully calling the scans view filtered by Scan name.
-
test_reverse_sorting()¶ Tests custom sorting in reverse.
-
test_sorting()¶ Tests custom sorting.
-
test_successful()¶ Tests successfully calling the get all scans view.
-
-
class
ingest.test.test_views.TestStrikeCreateViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCase-
fixtures= [u'ingest_job_types.json']¶
-
setUp()¶
-
test_configuration_bad_type()¶ Tests calling the create Strike view with configuration that is not a dict.
-
test_invalid_configuration()¶ Tests calling the create Strike view with invalid configuration.
-
test_missing_configuration()¶ Tests calling the create Strike view with missing configuration.
-
test_successful(*args, **keywargs)¶ Tests calling the create Strike view successfully.
-
test_successful_v6(*args, **keywargs)¶ Tests creating strike with recipe configuration
-
version= u'v6'¶
-
-
class
ingest.test.test_views.TestStrikeDetailsViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCase-
fixtures= [u'ingest_job_types.json']¶
-
setUp()¶
-
test_edit_bad_config()¶ Tests attempting to edit a Strike process using an invalid configuration
-
test_edit_config(*args, **keywargs)¶ Tests editing the configuration of a Strike process
-
test_edit_config_v6(*args, **keywargs)¶ Tests attempting to edit a Strike process adding a recipe configuration
-
test_edit_invalid_recipe()¶ Tests attempting to edit a Strike process with a nonexistant recipe
-
test_edit_simple()¶ Tests editing only the basic attributes of a Strike process
-
test_not_found()¶ Tests successfully calling the get Strike process details view with a model id that does not exist.
-
test_successful()¶ Tests successfully calling the get Strike process details view.
-
version= u'v6'¶
-
-
class
ingest.test.test_views.TestStrikesValidationViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCaseTests related to the Strike process validation endpoint
-
setUp()¶
-
test_configuration_bad_type()¶ Tests validating a new Strike process with configuration that is not a dict.
-
test_invalid_configuration()¶ Tests validating a new Strike process with invalid configuration.
-
test_missing_configuration()¶ Tests validating a new Strike process with missing configuration.
-
test_successful()¶ Tests validating a new Strike process.
-
test_successful_recipe()¶ Tests validating a new Scan process.
-
version= u'v6'¶
-
-
class
ingest.test.test_views.TestStrikesViewV6(methodName='runTest')¶ Bases:
rest_framework.test.APITestCase-
fixtures= [u'ingest_job_types.json']¶
-
setUp()¶
-
test_name()¶ Tests successfully calling the strikes view filtered by Strike name.
-
test_reverse_sorting()¶ Tests custom sorting in reverse.
-
test_sorting()¶ Tests custom sorting.
-
test_successful()¶ Tests successfully calling the get all strikes view.
-
version= u'v6'¶
-
ingest.test.utils module¶
Defines utility methods for testing ingests
-
ingest.test.utils.create_ingest(file_name=u'test.txt', status=u'TRANSFERRING', transfer_started=None, transfer_ended=None, ingest_started=None, ingest_ended=None, data_started=None, data_ended=None, workspace=None, new_workspace=None, strike=None, scan=None, source_file=None, data_type_tags=[])¶
-
ingest.test.utils.create_scan(name=None, title=None, description=None, configuration=None)¶
-
ingest.test.utils.create_scan_ingest_event(ingest=None, scan=None, source_file=None, description=None, when=None)¶
-
ingest.test.utils.create_strike(name=None, title=None, description=None, configuration=None, job=None)¶
-
ingest.test.utils.create_strike_ingest_event(ingest=None, strike=None, source_file=None, description=None, when=None)¶