oioioi.problems.tests.test_problem

Module Contents

Classes

TestProblemViews

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

TestProblemPackageAdminView

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

TestProblemPackageViews

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

TestProblemSite

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

TestProblemChangeForm

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

TestSubmissionLeft

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

TestSubmissionLeftWhenNoLimit

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

TestSubmissionLeftWhenNoContest

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

TestProblemSearchPermissions

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

TestProblemSearch

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

Functions

get_submission_left(username[, contest_id, pi_pk])

class oioioi.problems.tests.test_problem.TestProblemViews(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_permissions'][source]
post_package_file(url, filename, visibility=Problem.VISIBILITY_PRIVATE)[source]
test_problem_statement_view()[source]
test_admin_changelist_view()[source]
test_admin_change_view()[source]
test_admin_delete_view_basic()[source]
test_admin_add_in_contest_delete_in_problemset()[source]
test_admin_add_to_contest_delete_in_problemset()[source]
_test_problem_permissions()[source]
test_problem_permissions()[source]
class oioioi.problems.tests.test_problem.TestProblemPackageAdminView(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_problem_packages', 'test_problem_instance',...[source]
test_problem_info_brace()[source]
class oioioi.problems.tests.test_problem.TestProblemPackageViews(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_problem_packages', 'test_problem_instance'][source]
_test_package_permissions(is_admin=False)[source]
test_admin_changelist_view()[source]
test_package_file_view()[source]
test_package_traceback_view()[source]
test_package_permissions()[source]
class oioioi.problems.tests.test_problem.TestProblemSite(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_with_no_contest',...[source]
setUp()[source]

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

_get_site_urls()[source]
_create_PA()[source]
test_default_tabs()[source]
test_statement_tab()[source]
test_submissions_tab()[source]
test_submit_tab()[source]
test_settings_tab()[source]
test_statement_replacement()[source]
test_add_new_tab()[source]
test_external_statement_view()[source]
test_external_attachment_view()[source]
test_form_accessibility()[source]
class oioioi.problems.tests.test_problem.TestProblemChangeForm(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_quiz_problem_second'][source]
test_programming_problem_change_form()[source]
test_quiz_problem_change_form()[source]
oioioi.problems.tests.test_problem.get_submission_left(username, contest_id='c', pi_pk=1)[source]
class oioioi.problems.tests.test_problem.TestSubmissionLeft(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_admin()[source]
test_user_without_submissions()[source]
test_user_with_submissions()[source]
test_not_authenticated_user()[source]
class oioioi.problems.tests.test_problem.TestSubmissionLeftWhenNoLimit(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',...[source]
test_admin()[source]
test_user_without_submissions()[source]
test_user_with_submissions()[source]
test_not_authenticated_user()[source]
class oioioi.problems.tests.test_problem.TestSubmissionLeftWhenNoContest(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_full_package', 'test_problem_instance_with_no_contest'][source]
test_admin()[source]
test_user_without_submissions()[source]
test_not_authenticated_user()[source]
class oioioi.problems.tests.test_problem.TestProblemSearchPermissions(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, oioioi.problems.tests.utilities.AssertContainsOnlyMixin

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_problem_search_permissions'][source]
url[source]
test_search_permissions_public()[source]
test_search_permissions_my()[source]
test_search_permissions_all()[source]
class oioioi.problems.tests.test_problem.TestProblemSearch(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, oioioi.problems.tests.utilities.AssertContainsOnlyMixin

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_problem_search'][source]
url[source]
test_search_name()[source]
test_search_name_unicode()[source]
test_search_name_multiple()[source]
_test_search_name_localized(queries, exp_names)[source]
test_search_name_localized_en()[source]
test_search_name_localized_pl()[source]
test_search_short_name()[source]
test_search_short_name_multiple()[source]
test_search_tags_basic()[source]