:orphan: :py:mod:`oioioi.zeus.tests` =========================== .. py:module:: oioioi.zeus.tests Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.zeus.tests.ZeusDummyServer oioioi.zeus.tests.ZeusJsonTest oioioi.zeus.tests.ZeusSignatureTest oioioi.zeus.tests.ZeusHandlersTest oioioi.zeus.tests.ZeusViewsTest oioioi.zeus.tests.TestZeusProblemUpload Functions ~~~~~~~~~ .. autoapisummary:: oioioi.zeus.tests._updated_copy .. py:class:: ZeusDummyServer(zeus_id, server_info) Bases: :py:obj:`oioioi.zeus.backends.ZeusServer` .. py:method:: send_regular(zeus_problem_id, kind, source_code, language, submission_id, return_url) .. py:function:: _updated_copy(dict1, dict2) .. py:class:: ZeusJsonTest(methodName='runTest') Bases: :py:obj:`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. .. py:method:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: test_json_base64_encode() .. py:method:: test_json_base64_decode() .. py:method:: test_json_base64_identity() .. py:class:: ZeusSignatureTest(methodName='runTest') Bases: :py:obj:`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. .. py:method:: test_correct_signature() .. py:method:: test_incorrect_signature() .. py:class:: ZeusHandlersTest(methodName='runTest') Bases: :py:obj:`oioioi.base.tests.TestsUtilsMixin`, :py:obj:`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. .. py:attribute:: fixtures :annotation: = ['test_users', 'test_contest', 'test_full_package', 'test_problem_instance', 'test_submission',... .. py:method:: _verify_metadata_decoder(data) .. py:method:: test_csv_metadata_decoder() .. py:method:: _get_base_test_info(metadata='') .. py:method:: _assert_dict_contains_subset(subset, dictionary) Replacement for deprecated assertDictContainsSubset .. py:method:: test_assert_dict_contains_subset() .. py:method:: test_assert_dict_contains_subset_fail_no_overlap() .. py:method:: test_assert_dict_contains_subset_fail_wrong_value() .. py:method:: test_assert_dict_contains_subset_fail_not_full_overlap() .. py:method:: test_assert_dict_contains_subset_fail_empty_dict() .. py:method:: test_compilation_failure() .. py:method:: test_importing() .. py:class:: ZeusViewsTest(methodName='runTest') Bases: :py:obj:`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. .. py:attribute:: fixtures :annotation: = ['test_users', 'test_contest', 'test_full_package', 'test_problem_instance', 'test_submission',... .. py:method:: test_push_grade() .. py:class:: TestZeusProblemUpload(methodName='runTest') Bases: :py:obj:`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. .. py:attribute:: fixtures :annotation: = ['test_users', 'test_contest'] .. py:method:: test_upload_package()