oioioi.zeus.tests

Module Contents

Classes

ZeusDummyServer

ZeusJsonTest

Similar to TransactionTestCase, but use transaction.atomic() to achieve

ZeusSignatureTest

Similar to TransactionTestCase, but use transaction.atomic() to achieve

ZeusHandlersTest

Similar to TransactionTestCase, but use transaction.atomic() to achieve

ZeusViewsTest

Similar to TransactionTestCase, but use transaction.atomic() to achieve

TestZeusProblemUpload

Similar to TransactionTestCase, but use transaction.atomic() to achieve

Functions

_updated_copy(dict1, dict2)

class oioioi.zeus.tests.ZeusDummyServer(zeus_id, server_info)[source]

Bases: oioioi.zeus.backends.ZeusServer

send_regular(zeus_problem_id, kind, source_code, language, submission_id, return_url)[source]
oioioi.zeus.tests._updated_copy(dict1, dict2)[source]
class oioioi.zeus.tests.ZeusJsonTest(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase

Similar to TransactionTestCase, but use transaction.atomic() to achieve test isolation.

In most situations, TestCase should be preferred to TransactionTestCase as it allows faster execution. However, there are some situations where using TransactionTestCase might be necessary (e.g. testing some transactional behavior).

On database backends with no transaction support, TestCase behaves as TransactionTestCase.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_json_base64_encode()[source]
test_json_base64_decode()[source]
test_json_base64_identity()[source]
class oioioi.zeus.tests.ZeusSignatureTest(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase

Similar to TransactionTestCase, but use transaction.atomic() to achieve test isolation.

In most situations, TestCase should be preferred to TransactionTestCase as it allows faster execution. However, there are some situations where using TransactionTestCase might be necessary (e.g. testing some transactional behavior).

On database backends with no transaction support, TestCase behaves as TransactionTestCase.

test_correct_signature()[source]
test_incorrect_signature()[source]
class oioioi.zeus.tests.ZeusHandlersTest(methodName='runTest')[source]

Bases: oioioi.base.tests.TestsUtilsMixin, oioioi.base.tests.TestCase

Similar to TransactionTestCase, but use transaction.atomic() to achieve test isolation.

In most situations, TestCase should be preferred to TransactionTestCase as it allows faster execution. However, there are some situations where using TransactionTestCase might be necessary (e.g. testing some transactional behavior).

On database backends with no transaction support, TestCase behaves as TransactionTestCase.

fixtures = ['test_users', 'test_contest', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
_verify_metadata_decoder(data)[source]
test_csv_metadata_decoder()[source]
_get_base_test_info(metadata='')[source]
_assert_dict_contains_subset(subset, dictionary)[source]

Replacement for deprecated assertDictContainsSubset

test_assert_dict_contains_subset()[source]
test_assert_dict_contains_subset_fail_no_overlap()[source]
test_assert_dict_contains_subset_fail_wrong_value()[source]
test_assert_dict_contains_subset_fail_not_full_overlap()[source]
test_assert_dict_contains_subset_fail_empty_dict()[source]
test_compilation_failure()[source]
test_importing()[source]
class oioioi.zeus.tests.ZeusViewsTest(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase

Similar to TransactionTestCase, but use transaction.atomic() to achieve test isolation.

In most situations, TestCase should be preferred to TransactionTestCase as it allows faster execution. However, there are some situations where using TransactionTestCase might be necessary (e.g. testing some transactional behavior).

On database backends with no transaction support, TestCase behaves as TransactionTestCase.

fixtures = ['test_users', 'test_contest', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
test_push_grade()[source]
class oioioi.zeus.tests.TestZeusProblemUpload(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase

Similar to TransactionTestCase, but use transaction.atomic() to achieve test isolation.

In most situations, TestCase should be preferred to TransactionTestCase as it allows faster execution. However, there are some situations where using TransactionTestCase might be necessary (e.g. testing some transactional behavior).

On database backends with no transaction support, TestCase behaves as TransactionTestCase.

fixtures = ['test_users', 'test_contest'][source]
test_upload_package()[source]