:orphan: :py:mod:`oioioi.portals.tests` ============================== .. py:module:: oioioi.portals.tests Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.portals.tests.TestPortalUtils oioioi.portals.tests.TestPortalModels oioioi.portals.tests.TestPortalViews oioioi.portals.tests.TestMarkdown oioioi.portals.tests.TestMainPageAndPublicPortals Functions ~~~~~~~~~ .. autoapisummary:: oioioi.portals.tests.get_portal .. py:function:: get_portal() .. py:class:: TestPortalUtils(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_portals'] .. py:method:: test_portal_url() .. py:class:: TestPortalModels(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_portals'] .. py:method:: test_get_siblings() .. py:method:: test_get_path() .. py:class:: TestPortalViews(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_portals', 'test_contest', 'test_full_package', 'test_problem_instance',... .. py:method:: test_create_user_portal_view() .. py:method:: test_create_global_portal_view() .. py:method:: test_admin_buttons() .. py:method:: test_show_node_view() .. py:method:: test_admin_access() .. py:method:: test_edit_node_view() .. py:method:: test_add_node_view() .. py:method:: test_delete_node_view() .. py:method:: test_portal_tree_json_view() .. py:method:: test_move_node_view() .. py:method:: test_delete_portal_view() .. py:method:: test_global_portal_view() .. py:method:: test_old_global_portal_view() .. py:method:: test_problem_table_parsing() .. py:class:: TestMarkdown(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_double_asterisk() .. py:method:: test_youtube_widget() .. py:method:: test_problemtable_widget() .. py:method:: test_duplicate_tag() .. py:method:: test_block_spoiler() .. py:method:: test_block_spoiler_complex_body() .. py:method:: test_block_spoiler_nested() .. py:method:: test_block_spoiler_in_sequence() .. py:method:: test_table_element() .. py:class:: TestMainPageAndPublicPortals(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_portals'] .. py:method:: test_main_page_user() .. py:method:: test_public_main_page_admin() .. py:method:: test_all_main_page_admin() .. py:method:: test_global_main_page_admin() .. py:method:: test_main_page_search() .. py:method:: test_user_short_description() .. py:method:: test_admin_short_description_and_public()