:orphan: :py:mod:`oioioi.oi.tests` ========================= .. py:module:: oioioi.oi.tests Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.oi.tests.TestOIAdmin oioioi.oi.tests.TestOIRegistration oioioi.oi.tests.TestOIViews oioioi.oi.tests.TestSchoolAdding oioioi.oi.tests.TestSchoolAdmin oioioi.oi.tests.TestSchoolMerging oioioi.oi.tests.TestOISubmit oioioi.oi.tests.TestOIOnsiteSubmit oioioi.oi.tests.TestIgnoringCE oioioi.oi.tests.TestUserInfo .. py:class:: TestOIAdmin(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_oi_registration', 'test_permissions'] .. py:method:: test_admin_menu() .. py:method:: test_schools_import() .. py:method:: test_safe_exec_mode() .. py:method:: test_terms_accepted_phrase_inline_admin_permissions() .. py:method:: test_terms_accepted_phrase_inline_edit_restrictions() .. py:class:: TestOIRegistration(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_schools', 'test_terms_accepted_phrase'] .. py:method:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: test_participants_accounts_menu() .. py:method:: test_participants_unregister_forbidden() .. py:method:: test_default_terms_accepted_phrase() .. py:method:: test_participants_registration() .. py:method:: test_registration_with_new_school() .. py:class:: TestOIViews(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_contest_visibility() .. py:method:: test_contest_access() .. py:method:: test_ranking_access() .. py:class:: TestSchoolAdding(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_schools'] .. py:method:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: test_schools_similar_view() .. py:class:: TestSchoolAdmin(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_schools'] .. py:method:: test_schools_similar_finding() .. py:class:: TestSchoolMerging(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_schools'] .. py:method:: _call_admin_merge_action(schools_pk_list) .. py:method:: test_schools_merging_unsuccessfull() .. py:class:: TestOISubmit(methodName='runTest') Bases: :py:obj:`oioioi.base.tests.TestCase`, :py:obj:`oioioi.programs.tests.SubmitFileMixin` 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'] .. py:method:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: test_submit_permissions() .. py:class:: TestOIOnsiteSubmit(methodName='runTest') Bases: :py:obj:`oioioi.base.tests.TestCase`, :py:obj:`oioioi.programs.tests.SubmitFileMixin` 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'] .. py:method:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: test_submit_permissions() .. py:class:: TestIgnoringCE(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(controller_name) .. py:method:: test_all_oi_style_contests() .. py:class:: TestUserInfo(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_schools', 'test_permissions'] .. py:method:: test_user_info_page()