batch.test package

Submodules

batch.test.test_models module

class batch.test.test_models.TestBatchManager(methodName='runTest')

Bases: django.test.testcases.TransactionTestCase

fixtures = [u'batch_job_types.json']
setUp()
test_create_successful_v6()

Tests calling BatchManager.create_batch_v6

batch.test.test_views module

class batch.test.test_views.MockCommandMessageManager
send_messages(commands)
class batch.test.test_views.TestBatchDetailsViewV6(methodName='runTest')

Bases: rest_framework.test.APITestCase

fixtures = [u'batch_job_types.json']
setUp()
test_edit_invalid_batch()

Tests editing an invalid batch ID

test_edit_invalid_configuration()

Tests editing a batch with an invalid configuration

test_edit_invalid_version()

Tests editing a batch with an invalid REST API version

test_edit_put_not_allowed()

Tests editing a batch with HTTP PUT to ensure it is not allowed

test_edit_successful()

Tests editing a batch successfully

test_invalid_version()

Tests calling the v6 batch details view with an invalid version

test_not_found()

Tests successfully calling the v6 batch details view with a batch id that does not exist

test_successful()

Tests successfully calling the v6 batch details view

class batch.test.test_views.TestBatchesComparisonViewV6(methodName='runTest')

Bases: rest_framework.test.APITestCase

setUp()
test_invalid_version()

Tests calling the v6 batch comparison view with an invalid version

test_successful(*args, **keywargs)

Tests successfully calling the v6 batch comparison view

test_successful_no_batches()

Tests successfully calling the v6 batch comparison view with a root batch ID that does not exist

class batch.test.test_views.TestBatchesValidationViewV6(methodName='runTest')

Bases: rest_framework.test.APITransactionTestCase

setUp()
test_create_invalid_configuration()

Tests creating a new batch with an invalid configuration

test_create_invalid_definition()

Tests creating a new batch with an invalid definition

test_create_invalid_prev_batch()

Tests creating a new batch with an invalid previous batch

test_create_invalid_recipe_type()

Tests validating a new batch with an invalid recipe type

test_create_mismatched_recipe_types()

Tests creating a new batch with a mismatched recipe type

test_create_new_successful()

Tests creating a new batch successfully

test_create_successful()

Tests creating a new batch successfully

test_invalid_version()

Tests validating a new batch with an invalid REST API version

class batch.test.test_views.TestBatchesViewV6(methodName='runTest')

Bases: rest_framework.test.APITransactionTestCase

setUp()
test_create_invalid_configuration()

Tests creating a new batch with an invalid configuration

test_create_invalid_definition()

Tests creating a new batch with an invalid definition

test_create_invalid_recipe_type()

Tests creating a new batch with an invalid recipe type

test_create_invalid_version()

Tests creating a new batch with an invalid REST API version

test_create_new_batch(*args, **keywargs)

Tests successfully creating a new batch

test_create_new_batch_inputmap(*args, **keywargs)

Tests successfully creating a new batch

test_create_priority(*args, **keywargs)

Tests creating a new batch successfully and having the priority of created jobs set properly

test_invalid_version()

Tests calling the batches view with an invalid REST API version

test_is_creation_done()

Tests successfully calling the batches view filtered by is_creation_done

test_order_by()

Tests successfully calling the batches view with sorting

test_previous_create_successful(*args, **keywargs)

Tests creating a new batch successfully

test_recipe_type_id()

Tests successfully calling the batches view filtered by recipe type identifier

test_root_batch_and_superseded()

Tests successfully calling the batches view filtered by is_superseded and root_batch_id

test_root_batch_id()

Tests successfully calling the batches view filtered by root_batch_id

test_successful_get()

Tests successfully calling the batches view

batch.test.utils module

Defines utility methods for testing batches

batch.test.utils.create_batch(title=None, description=None, recipe_type=None, definition=None, configuration=None, is_creation_done=False, recipes_total=None)

Creates a batch model for unit testing

Returns:The batch model
Return type:batch.models.Batch

Module contents