:orphan: :py:mod:`oioioi.simpleui.tests` =============================== .. py:module:: oioioi.simpleui.tests Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.simpleui.tests.TestContestDashboard oioioi.simpleui.tests.TestUserDashboard oioioi.simpleui.tests.TestProblemInstance oioioi.simpleui.tests.TestProblemInstanceSettings oioioi.simpleui.tests.TestProblemInstanceValidation Functions ~~~~~~~~~ .. autoapisummary:: oioioi.simpleui.tests.change_contest_type .. py:function:: change_contest_type(contest) .. py:class:: TestContestDashboard(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_messages',... .. py:attribute:: compile_flags .. py:method:: test_contest_dashboard() .. py:method:: test_open_contest_dashboard() .. py:method:: test_not_open_contest_dashboard() .. py:method:: test_contest_dashboard_lacking_permissions() .. py:method:: test_contest_dashboard_no_rounds() .. py:class:: TestUserDashboard(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_messages',... .. py:attribute:: compile_flags .. py:method:: test_permissions() .. py:method:: test_permissions_invisible() .. py:method:: test_user_dashboard() .. py:method:: test_user_dashboard_empty() .. py:method:: test_user_dashboard_full() .. py:class:: TestProblemInstance(methodName='runTest') Bases: :py:obj:`oioioi.base.tests.TestCase` Abstract base class with login utility for problem instance tests classes. .. py:method:: login(get_problems) .. py:class:: TestProblemInstanceSettings(methodName='runTest') Bases: :py:obj:`TestProblemInstance` Abstract base class with login utility for problem instance tests classes. .. py:attribute:: fixtures :annotation: = ['test_users', 'teachers', 'test_contest', 'test_full_package', 'test_problem_instance',... .. py:attribute:: form_data .. py:method:: test_test_settings_ok() .. py:method:: test_time_limit() .. py:method:: test_memory_limit() .. py:class:: TestProblemInstanceValidation(methodName='runTest') Bases: :py:obj:`TestProblemInstance` Abstract base class with login utility for problem instance tests classes. .. py:attribute:: fixtures :annotation: = ['test_users', 'teachers', 'test_contest', 'test_full_package', 'test_problem_instance'] .. py:attribute:: form_data .. py:method:: test_max_scores()