:orphan: :py:mod:`oioioi.forum.tests` ============================ .. py:module:: oioioi.forum.tests Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.forum.tests.TestForum oioioi.forum.tests.TestCategory oioioi.forum.tests.TestThread oioioi.forum.tests.TestLatestPosts oioioi.forum.tests.TestPost oioioi.forum.tests.TestBan Functions ~~~~~~~~~ .. autoapisummary:: oioioi.forum.tests.get_contest_with_forum oioioi.forum.tests.get_contest_with_no_forum .. py:function:: get_contest_with_forum() .. py:function:: get_contest_with_no_forum() .. py:class:: TestForum(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:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: test_no_forum_menu() .. py:method:: test_forum_menu() .. py:method:: test_lock_forum_with_no_unlock_date() .. py:method:: test_lock_forum_with_unlock_date() .. py:method:: test_unlock_forum() .. py:class:: TestCategory(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:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: test_add_new() .. py:method:: test_no_thread() .. py:method:: test_new_categories_are_in_order() .. py:method:: test_category_move_up_down() .. py:method:: test_toggling_reactions() .. py:class:: TestThread(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:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: try_to_remove_post(post) .. py:method:: test_remove_posts() .. py:class:: TestLatestPosts(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:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: test_paging() .. py:class:: TestPost(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:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: reverse_post(view_name) .. py:method:: assertContainsReportOption(response) .. py:method:: assertContainsApproveOption(response) .. py:method:: report_post() .. py:method:: test_report() .. py:method:: test_approve_after_report() .. py:method:: test_approve_without_report() .. py:method:: test_report_after_approve() .. py:method:: test_revoking_approval_after_edit() .. py:method:: test_admin_approval_edit() .. py:method:: test_admin_approve_action() .. py:method:: test_admin_revoke_approval_action() .. py:method:: test_revoke_approval() .. py:method:: test_reactions_visible_only_if_enabled() .. py:method:: test_reactions_not_clickable_for_anon() .. py:method:: test_reactions_from_multiple_users() .. py:method:: test_remove_reaction() .. py:method:: test_switch_reaction() .. py:class:: TestBan(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:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: test_report_post() .. py:method:: test_add_thread() .. py:method:: test_edit_post() .. py:method:: test_add_post() .. py:method:: test_ban_view_without_removing_reports()