oioioi.contests.tests.tests

Module Contents

Classes

TestModels

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

TestScores

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

TestSubmissionListOrder

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

TestSubmissionListFilters

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

TestUrls

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

TestCurrentContest

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

TestContestController

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

TestContestViews

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

TestMySubmissions

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

TestManyRounds

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

TestMultilingualStatements

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

ContestWithoutStatementsController

Contains the contest logic and rules.

TestMySubmissionsContext

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

TestSubmitButtonInProblemsList

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

TestStatementsVisibility

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

BrokenContestController

Contains the contest logic and rules.

TestRejudgeAndFailure

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

TestRejudgeTypesView

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

TestContestAdmin

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

TestAttachments

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

TestRoundExtension

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

TestPermissions

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

TestPermissionsBasicAdmin

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

TestProblemsMenuWithQuizzes

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

TestSubmissionChangeKind

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

TestDeleteSelectedSubmissions

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

TestSubmitSelectOneProblem

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

TestSubmitSelectManyProblems

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

TestDateRegistry

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

ContestWithPublicResultsController

Contains the contest logic and rules.

TestPublicResults

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

TestContestLinks

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

TestPersonalDataUser

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

TestUserInfo

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

TestProblemInstanceView

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

TestReattachingProblems

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

TestModifyContest

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

TestRegistrationController

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

TestAdministeredContests

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

TestSubmissionViewWithoutContest

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

TestSubmissionAdminWithoutContest

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

TestSubmissionsLimitOnListView

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

TestSubmissionsLinksOnListView

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

TestNoSubmissionsLimitOnListView

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

TestAPIGetProblemId

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

TestAPISubmitBase

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

TestAPIContestSubmit

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

TestAPIProblemsetSubmit

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

TestManyRoundsNoEnd

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

TestRankingVisibility

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

TestContestChangeForm

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

TestOpenRegistration

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

Functions

print_contest_id_view(request)

render_contest_id_view(request)

failing_handler(env)

see_limits_on_problems_list(self, username, ...[, ...])

see_link_for_submission_on_problem_list(self, ...)

check_ranking_visibility(self, url, rvc)

set_registration_availability(rvc, enabled[, ...])

check_registration(self, expected_status_code, ...[, ...])

class oioioi.contests.tests.tests.TestModels(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.

test_fields_autogeneration()[source]
class oioioi.contests.tests.tests.TestScores(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', 'test_full_package', 'test_problem_instance', 'test_submission'][source]
test_integer_score()[source]
test_score_field()[source]
test_db_order()[source]
oioioi.contests.tests.tests.print_contest_id_view(request)[source]
oioioi.contests.tests.tests.render_contest_id_view(request)[source]
class oioioi.contests.tests.tests.TestSubmissionListOrder(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', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
setUp()[source]

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

test_default_order()[source]
check_id_order_in_response(response, ids)[source]
test_score_order()[source]
check_ce_order_in_response(response, is_descending, error_msg)[source]
check_order_in_response(response, order, error_msg)[source]
class oioioi.contests.tests.tests.TestSubmissionListFilters(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', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
setUp()[source]

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

test_all_filters()[source]
class oioioi.contests.tests.tests.TestUrls(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'][source]
test_make_patterns()[source]
test_reverse()[source]
class oioioi.contests.tests.tests.TestCurrentContest(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_two_empty_contests'][source]
_test_redirecting_contest_mode()[source]
test_neutral_contest_mode()[source]
test_contest_if_possible_contest_mode()[source]
test_contest_only_contest_mode()[source]
test_namespaced_redirect()[source]
class oioioi.contests.tests.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_users', 'test_contest', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
test_order_rounds_by_focus()[source]
class oioioi.contests.tests.tests.TestContestViews(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', 'test_full_package', 'test_problem_instance', 'test_submission'][source]
test_recent_contests_list()[source]
test_contest_visibility()[source]
test_submission_view()[source]
test_submissions_permissions()[source]
class oioioi.contests.tests.tests.TestMySubmissions(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', 'test_full_package', 'test_problem_instance', 'test_submission_list'][source]
test_submission_messages()[source]
class oioioi.contests.tests.tests.TestManyRounds(methodName='runTest')[source]

Bases: oioioi.base.tests.TestsUtilsMixin, 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', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
static remove_ws(response)[source]
test_problems_visibility()[source]
test_submissions_visibility()[source]
test_mixin_past_rounds_hidden_during_prep_time()[source]
class oioioi.contests.tests.tests.TestMultilingualStatements(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, oioioi.filetracker.tests.TestStreamingMixin

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', 'test_full_package', 'test_problem_instance', 'test_extra_statements'][source]
test_multilingual_statements()[source]
class oioioi.contests.tests.tests.ContestWithoutStatementsController(contest)[source]

Bases: oioioi.programs.controllers.ProgrammingContestController

Contains the contest logic and rules.

This is the computerized implementation of the contest’s official rules.

default_can_see_statement(request_or_context, problem_instance)[source]
class oioioi.contests.tests.tests.TestMySubmissionsContext(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', 'test_full_package', 'test_problem_instance'][source]
test_config()[source]
class oioioi.contests.tests.tests.TestSubmitButtonInProblemsList(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', 'test_full_package', 'test_problem_instance', 'test_submission'][source]
test_with_authorized_user()[source]
test_with_unauthorized_user()[source]
test_with_no_submissions_left()[source]
test_with_ended_round()[source]
class oioioi.contests.tests.tests.TestStatementsVisibility(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', 'test_full_package', 'test_problem_instance'][source]
test_controller()[source]
test_statements_config()[source]
oioioi.contests.tests.tests.failing_handler(env)[source]
class oioioi.contests.tests.tests.BrokenContestController(contest)[source]

Bases: oioioi.programs.controllers.ProgrammingContestController

Contains the contest logic and rules.

This is the computerized implementation of the contest’s official rules.

fill_evaluation_environ(environ, submission)[source]
class oioioi.contests.tests.tests.TestRejudgeAndFailure(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', 'test_full_package', 'test_problem_instance', 'test_submission'][source]
test_rejudge_request()[source]
test_rejudge_and_failure()[source]
test_suspicious_rejudge_request()[source]
class oioioi.contests.tests.tests.TestRejudgeTypesView(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', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
test_view()[source]
class oioioi.contests.tests.tests.TestContestAdmin(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'][source]
test_simple_contest_create_and_change()[source]
test_admin_permissions()[source]
class oioioi.contests.tests.tests.TestAttachments(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, oioioi.filetracker.tests.TestStreamingMixin

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', 'test_full_package', 'test_problem_instance'][source]
test_attachments()[source]
test_pub_date()[source]
class oioioi.contests.tests.tests.TestRoundExtension(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, oioioi.programs.tests.SubmitFileMixin

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', 'test_full_package', 'test_problem_instance', 'test_extra_rounds'][source]
test_round_extension()[source]
test_round_extension_admin()[source]
class oioioi.contests.tests.tests.TestPermissions(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', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
get_fake_request_factory(contest=None)[source]
setUp()[source]

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

test_utils()[source]
test_privilege_manipulation()[source]
test_menu()[source]
class oioioi.contests.tests.tests.TestPermissionsBasicAdmin(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_permissions', 'test_contest', 'test_full_package', 'test_problem_packages',...[source]
setUp()[source]

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

test_dashboard()[source]
test_menu()[source]
test_menu_settings()[source]
test_menu_problems()[source]
test_problem_admin()[source]
test_probleminstance_admin()[source]
test_modelsolutions()[source]
test_modelsubmission_source()[source]
test_menu_submissions()[source]
test_menu_problempackages_basicadmin()[source]
test_menu_problempackages_admin()[source]
test_usermenu()[source]
test_usermenu_files()[source]
test_usermenu_submit()[source]
test_usermenu_ranking()[source]
test_usermenu_questions_and_news()[source]
test_show_info_about()[source]
class oioioi.contests.tests.tests.TestProblemsMenuWithQuizzes(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_permissions', 'test_contest', 'test_quiz_problem', 'test_problem_instance',...[source]
test_menu_problems()[source]
class oioioi.contests.tests.tests.TestSubmissionChangeKind(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', 'test_full_package', 'test_problem_instance', 'test_multiple_submissions'][source]
setUp()[source]

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

change_kind(submission, kind)[source]
test_kind_change()[source]
class oioioi.contests.tests.tests.TestDeleteSelectedSubmissions(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', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
test_delete_one_submission()[source]
test_delete_many_submissions()[source]
class oioioi.contests.tests.tests.TestSubmitSelectOneProblem(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', 'test_full_package', 'test_problem_instance'][source]
test_problems_list()[source]
class oioioi.contests.tests.tests.TestSubmitSelectManyProblems(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_extra_problem', 'test_contest', 'test_full_package', 'test_problem_instance'][source]
test_problems_list()[source]
class oioioi.contests.tests.tests.TestDateRegistry(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'][source]
test_registry_content()[source]
class oioioi.contests.tests.tests.ContestWithPublicResultsController(contest)[source]

Bases: oioioi.programs.controllers.ProgrammingContestController

Contains the contest logic and rules.

This is the computerized implementation of the contest’s official rules.

separate_public_results()[source]

Determines if there should be two separate dates for personal results (when participants can see their scores for a given round) and public results (when round ranking is published).

Depending on the value returned, contest admins can see and modify both Results date and Public results date or only the first one.

Return type

bool

class oioioi.contests.tests.tests.TestPublicResults(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]
_change_controller(public_results=False)[source]
test_round_inline()[source]
_check_public_results(expected)[source]
test_public_results_visible()[source]
test_all_results_visible()[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]
test_menu()[source]
class oioioi.contests.tests.tests.TestPersonalDataUser(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_permissions'][source]
testUser()[source]
class oioioi.contests.tests.tests.TestUserInfo(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', 'test_full_package', 'test_problem_instance', 'test_submission'][source]
test_user_info_page()[source]
class oioioi.contests.tests.tests.TestProblemInstanceView(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', 'test_full_package', 'test_problem_instance', 'test_permissions',...[source]
test_admin_change_view()[source]
separate_main_problem_instance()[source]
test_resetting_limits()[source]
test_rejudge_not_needed()[source]
class oioioi.contests.tests.tests.TestReattachingProblems(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', 'test_extra_contests', 'test_full_package',...[source]
test_reattaching_problem()[source]
test_permissions()[source]
class oioioi.contests.tests.tests.TestModifyContest(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'][source]
test_modify_contest()[source]
class oioioi.contests.tests.tests.TestRegistrationController(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_two_empty_contests', 'test_users'][source]
test_filter_visible_contests()[source]
class oioioi.contests.tests.tests.TestAdministeredContests(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_two_empty_contests', 'test_users'][source]
test_administered_contests()[source]
class oioioi.contests.tests.tests.TestSubmissionViewWithoutContest(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_full_package', 'test_problem_site',...[source]
setUp()[source]

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

test_submission_view_without_contest()[source]
class oioioi.contests.tests.tests.TestSubmissionAdminWithoutContest(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, oioioi.programs.tests.SubmitFileMixin

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_extra_contests', 'test_users', 'test_full_package', 'test_extra_problem_instance',...[source]
setUp()[source]

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

test_submission_admin_without_contest()[source]
oioioi.contests.tests.tests.see_limits_on_problems_list(self, username, displays_submissions_limit, displays_tries_left, additional=[])[source]
class oioioi.contests.tests.tests.TestSubmissionsLimitOnListView(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', 'test_full_package', 'test_problem_instance', 'test_submission'][source]
test_anonymous_user()[source]
test_user()[source]
test_admin()[source]
class oioioi.contests.tests.tests.TestSubmissionsLinksOnListView(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', 'test_full_package', 'test_problem_instance', 'test_submission'][source]
class oioioi.contests.tests.tests.TestNoSubmissionsLimitOnListView(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', 'test_full_package', 'test_submission',...[source]
test_not_displaying_limits()[source]
class oioioi.contests.tests.tests.TestAPIGetProblemId(methodName='runTest')[source]

Bases: rest_framework.test.APITestCase

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', 'test_full_package', 'test_problem_instance'][source]
view_name = api_contest_get_problem_id[source]
setUp()[source]

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

test_successful_query()[source]
test_invalid_contest_id()[source]
test_invalid_problem_short_name()[source]
class oioioi.contests.tests.tests.TestAPISubmitBase(*args, **kwargs)[source]

Bases: rest_framework.test.APITestCase

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', 'test_full_package', 'test_submission'][source]
extra_fixtures = [][source]
setUp()[source]

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

submit_file(url_name, url_kwargs, file_size=1024, file_name='submission.cpp', kind=None)[source]
_assertSubmitted(response, i=None)[source]
class oioioi.contests.tests.tests.TestAPIContestSubmit(*args, **kwargs)[source]

Bases: TestAPISubmitBase

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.

extra_fixtures = ['test_problem_instance'][source]
contest_submit(contest, pi, *args, **kwargs)[source]
test_simple_submission()[source]
test_submissions_limitation()[source]
test_huge_submission()[source]
test_size_limit_accuracy()[source]
_assertUnsupportedExtension(contest, problem_instance, name, ext)[source]
test_limiting_extensions()[source]
class oioioi.contests.tests.tests.TestAPIProblemsetSubmit(*args, **kwargs)[source]

Bases: TestAPISubmitBase

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.

extra_fixtures = ['test_problem_site', 'test_problem_instance_with_no_contest'][source]
problemset_submit(problem=None, site_key=None, *args, **kwargs)[source]
test_problemset_submission()[source]
class oioioi.contests.tests.tests.TestManyRoundsNoEnd(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', 'test_full_package', 'test_problem_instance', 'test_submission',...[source]
test_not_sorting()[source]
oioioi.contests.tests.tests.check_ranking_visibility(self, url, rvc)[source]
class oioioi.contests.tests.tests.TestRankingVisibility(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', 'test_full_package', 'test_problem_instance', 'test_submission'][source]
test_user()[source]
test_admin()[source]
class oioioi.contests.tests.tests.TestContestChangeForm(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]
test_contest_change_form()[source]
oioioi.contests.tests.tests.set_registration_availability(rvc, enabled, available_from=None, available_to=None)[source]
oioioi.contests.tests.tests.check_registration(self, expected_status_code, availability, available_from=None, available_to=None)[source]
class oioioi.contests.tests.tests.TestOpenRegistration(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]
test_open_registration()[source]
test_closed_registration()[source]
test_configured_registration_opened()[source]
test_configured_registration_closed_before()[source]
test_configured_registration_closed_after()[source]