oioioi.forum.tests

Module Contents

Classes

TestForum

Similar to TransactionTestCase, but use transaction.atomic() to achieve

TestCategory

Similar to TransactionTestCase, but use transaction.atomic() to achieve

TestThread

Similar to TransactionTestCase, but use transaction.atomic() to achieve

TestLatestPosts

Similar to TransactionTestCase, but use transaction.atomic() to achieve

TestPost

Similar to TransactionTestCase, but use transaction.atomic() to achieve

TestBan

Similar to TransactionTestCase, but use transaction.atomic() to achieve

Functions

oioioi.forum.tests.get_contest_with_forum()[source]
oioioi.forum.tests.get_contest_with_no_forum()[source]
class oioioi.forum.tests.TestForum(methodName='runTest')[source]

Bases: 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.

fixtures = ['test_users', 'test_contest'][source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_no_forum_menu()[source]
test_forum_menu()[source]
test_lock_forum_with_no_unlock_date()[source]
test_lock_forum_with_unlock_date()[source]
test_unlock_forum()[source]
class oioioi.forum.tests.TestCategory(methodName='runTest')[source]

Bases: 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.

fixtures = ['test_users', 'test_contest'][source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_add_new()[source]
test_no_thread()[source]
test_new_categories_are_in_order()[source]
test_category_move_up_down()[source]
test_toggling_reactions()[source]
class oioioi.forum.tests.TestThread(methodName='runTest')[source]

Bases: 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.

fixtures = ['test_users', 'test_contest'][source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

try_to_remove_post(post)[source]
test_remove_posts()[source]
class oioioi.forum.tests.TestLatestPosts(methodName='runTest')[source]

Bases: 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.

fixtures = ['test_users', 'test_contest'][source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_paging()[source]
class oioioi.forum.tests.TestPost(methodName='runTest')[source]

Bases: 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.

fixtures = ['test_users', 'test_contest'][source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

reverse_post(view_name)[source]
assertContainsReportOption(response)[source]
assertContainsApproveOption(response)[source]
report_post()[source]
test_report()[source]
test_approve_after_report()[source]
test_approve_without_report()[source]
test_report_after_approve()[source]
test_revoking_approval_after_edit()[source]
test_admin_approval_edit()[source]
test_admin_approve_action()[source]
test_admin_revoke_approval_action()[source]
test_revoke_approval()[source]
test_reactions_visible_only_if_enabled()[source]
test_reactions_not_clickable_for_anon()[source]
test_reactions_from_multiple_users()[source]
test_remove_reaction()[source]
test_switch_reaction()[source]
class oioioi.forum.tests.TestBan(methodName='runTest')[source]

Bases: 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.

fixtures = ['test_users', 'test_contest'][source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_report_post()[source]
test_add_thread()[source]
test_edit_post()[source]
test_add_post()[source]
test_ban_view_without_removing_reports()[source]