source.test package¶
Subpackages¶
Submodules¶
source.test.test_models module¶
-
class
source.test.test_models.
TestSourceFileManager
(methodName='runTest')¶ Bases:
django.test.testcases.TestCase
-
fixtures
= [u'ingest_job_types.json']¶
-
setUp
()¶
-
test_get_source_ingests
()¶ Tests calling get_source_ingests()
-
test_get_source_jobs
()¶ Tests calling get_source_jobs()
-
test_get_source_products
()¶ Tests calling get_source_products()
-
test_get_sources_data_time
()¶ Tests calling get_sources() using data time
-
-
class
source.test.test_models.
TestSourceFileManagerSaveParseResults
(methodName='runTest')¶ Bases:
django.test.testcases.TestCase
-
fixtures
= [u'ingest_job_types.json']¶
-
setUp
()¶
-
test_move_source_file
(*args, **keywargs)¶ Tests calling save_parse_results so that the source file is moved to a different path in the workspace
-
test_move_source_file_denied
(*args, **keywargs)¶ Tests calling save_parse_results where the source file is not allowed to be moved within the workspace
-
test_successful_data_time_save
()¶ Tests calling save_parse_results and checks that the data time is saved within the corresponding ingest model
-
test_valid_feature
()¶ Tests calling save_parse_results with valid arguments
-
test_valid_feature_collection
()¶ Tests calling save_parse_results with valid arguments
-
test_valid_polygon
()¶ Tests calling save_parse_results with valid arguments
-
source.test.utils module¶
Defines utility methods for testing source files
-
source.test.utils.
create_source
(file_name=u'my_test_file.txt', file_size=100, media_type=u'text/plain', file_path=u'/file/path/my_test_file.txt', data_started=None, data_ended=None, is_parsed=True, parsed=None, workspace=None, countries=None, data_type_tags=[])¶ Creates a source file model for unit testing
Returns: The source file model Return type: storage.models.ScaleFile