product.test package¶
Subpackages¶
Submodules¶
product.test.test_models module¶
-
class
product.test.test_models.TestFileAncestryLinkManagerCreateFileAncestryLinks(methodName='runTest')¶ Bases:
django.test.testcases.TestCase-
setUp()¶
-
test_batch_recipe()¶ Tests creating a link that has a recipe and batch.
-
test_inputs()¶ Tests creating links for only input files before any products are generated.
-
test_inputs_and_products()¶ Tests creating links for inputs and then later replacing with generated products.
-
test_products()¶ Tests creating links for inputs with generated products at the same time.
-
-
class
product.test.test_models.TestProductFileManager(methodName='runTest')¶ Bases:
django.test.testcases.TestCaseTests on the ProductFileManager
-
setUp()¶
-
test_publish_products_already_superseded()¶ Tests calling ProductFileManager.publish_products() where the job execution is already superseded
-
test_publish_products_successfully()¶ Tests calling ProductFileManager.publish_products() successfully
-
test_publish_products_supersede_products()¶ Tests calling ProductFileManager.publish_products() where products with existing UUIDs get superseded
-
test_publish_products_unpublish_superseded()¶ Tests calling ProductFileManager.publish_products() where the job has superseded job products that must be unpublished
-
-
class
product.test.test_models.TestProductFileManagerGetProductUpdatesQuery(methodName='runTest')¶ Bases:
django.test.testcases.TestCaseTests on the ProductFileManager.get_product_updates_query() method
-
setUp()¶
-
test_job_types()¶ Tests calling ProductFileManager.get_updates() with a “job_type_ids” argument value
-
test_no_job_types()¶ Tests calling ProductFileManager.get_updates() without a “job_type_ids” argument value
-
-
class
product.test.test_models.TestProductFileManagerPopulateSourceAncestors(methodName='runTest')¶ Bases:
django.test.testcases.TestCaseTests on the ProductFileManager.populate_source_ancestors() method
-
setUp()¶
-
test_successful()¶ Tests calling ProductFileManager.populate_source_ancestors() successfully
-
-
class
product.test.test_models.TestProductFileManagerUploadFiles(methodName='runTest')¶ Bases:
django.test.testcases.TestCase-
setUp()¶
-
test_batch_link(*args, **keywargs)¶ Tests calling ProductFileManager.upload_files() successfully when associated with a batch
-
test_geo_metadata(*args, **keywargs)¶ Tests calling ProductFileManager.upload_files() successfully with extra geometry meta data
-
test_recipe_link(*args, **keywargs)¶ Tests calling ProductFileManager.upload_files() successfully when associated with a recipe
-
test_success(*args, **keywargs)¶ Tests calling ProductFileManager.upload_files() successfully
-
test_uuid(*args, **keywargs)¶ Tests setting UUIDs on products from a single job execution.
-
test_uuid_use_input_files(*args, **keywargs)¶ Tests setting UUIDs on products with different source input files.
-
test_uuid_use_job_exe(*args, **keywargs)¶ Tests setting UUIDs on products from multiple job executions of the same type.
-
test_uuid_use_job_type(*args, **keywargs)¶ Tests setting UUIDs on products with different job types.
-
test_uuid_use_properties(*args, **keywargs)¶ Tests setting UUIDs on products with different property values.
-
product.test.utils module¶
Defines utility methods for testing products
-
product.test.utils.create_file_link(ancestor=None, descendant=None, job=None, job_exe=None, recipe=None, batch=None)¶ Creates a file ancestry link model for unit testing
Returns: The file ancestry link model Return type: product.models.FileAncestryLink
-
product.test.utils.create_product(job_exe=None, workspace=None, has_been_published=False, is_published=False, uuid=None, file_name=u'my_test_file.txt', file_path=u'/file/path/my_test_file.txt', media_type=u'text/plain', file_size=100, countries=None, is_superseded=False, superseded=None)¶ Creates a product file model for unit testing
Returns: The product model Return type: storage.models.ScaleFile