oioioi.disqualification.tests

Module Contents

Classes

TestContestController

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

TestViewsMixin

TestViewsProgramSubmissions

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

TestViewsQuizSubmission

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

Functions

oioioi.disqualification.tests._disqualify_contestwide()[source]
class oioioi.disqualification.tests.TestContestController(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_contest', 'test_users', 'test_submission', 'test_full_package', 'test_problem_instance',...[source]
_get_fake_request(user, contest)[source]
test_disqualified()[source]
test_not_disqualified()[source]
test_disqualified_contestwide()[source]
class oioioi.disqualification.tests.TestViewsMixin[source]

Bases: object

static remove_whitespaces(response)[source]
abstract _assert_disqualification_box(response_callback)[source]
_assert_submission(submission_id, disqualified)[source]
test_dashboard()[source]
test_my_submissions()[source]
test_user_info_page()[source]
class oioioi.disqualification.tests.TestViewsProgramSubmissions(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, TestViewsMixin

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_contest', 'test_users', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
setUp()[source]

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

_assert_disqualification_box(response_callback)[source]
test_ranking()[source]
test_ranking_csv()[source]
test_submission()[source]
class oioioi.disqualification.tests.TestViewsQuizSubmission(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, TestViewsMixin

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_contest', 'test_users', 'test_quiz_problem', 'test_problem_instance',...[source]
setUp()[source]

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

_assert_disqualification_box(response_callback)[source]
test_submission()[source]