oioioi.contestexcl.tests

Module Contents

Classes

ContestIdViewCheckMixin

TestExclusiveContestsAdmin

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

TestExclusiveContests

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

Functions

add_ex_conf(contest, start_date[, end_date, enabled])

oioioi.contestexcl.tests.add_ex_conf(contest, start_date, end_date=None, enabled=True)[source]
class oioioi.contestexcl.tests.ContestIdViewCheckMixin[source]

Bases: object

_assertContestVisible(contest_id)[source]
_assertContestRedirects(contest_id, where)[source]
class oioioi.contestexcl.tests.TestExclusiveContestsAdmin(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, ContestIdViewCheckMixin

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_permissions', 'test_users', 'test_contest'][source]
setUp()[source]

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

_check_user_access()[source]
_check_contestadmin_access(visible)[source]
_check_superadmin_access()[source]
test_no_exclusiveness()[source]
test_exclusiveness_on()[source]
test_exclusiveness_off()[source]
test_exclusiveness_multiple_on()[source]
test_exclusiveness_multiple_off()[source]
test_exclusiveness_multiple_mixed_on_off()[source]
_modify_contestexcl(round_start_date_form, round_end_date_form=('', ''), excl_start_date_forms=(), excl_end_date_forms=())[source]
test_exclusiveness_round_warning()[source]
test_exclusiveness_round_warning_multiple_configs()[source]
class oioioi.contestexcl.tests.TestExclusiveContests(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, ContestIdViewCheckMixin

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_two_empty_contests'][source]
setUp()[source]

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

test_exclusive_contest()[source]
test_exclusive_contest_multiple_configs()[source]
test_enabled_field()[source]
test_exclusive_contests_error()[source]
test_default_selector()[source]