oioioi.participants.tests

Module Contents

Classes

ParticipantsContestController

Contains the contest logic and rules.

OnsiteContestController

Contains the contest logic and rules.

TestParticipantsContestViews

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

TestParticipantsSubmit

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

TestParticipantsRegistration

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

TestOpenParticipantsRegistration

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

NoAdminParticipantsRegistrationController

A base class for classes which should have a list of subclasses

NoAdminParticipantsContestController

Contains the contest logic and rules.

TestOnsiteAdmin

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

TestParticipantsModelAdmin

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

TestParticipantsExclusiveContestsMiddlewareMixin

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

TestRegistrationModel

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

AnonymousRegistrationController

A base class for classes which should have a list of subclasses

AnonymousContestController

Contains the contest logic and rules.

TestAnonymousParticipants

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

TestParticipantsDataViews

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

TestOnsiteViews

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

TestOnsiteRegistration

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

TestUserInfo

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

Attributes

oioioi.participants.tests.basedir[source]
class oioioi.participants.tests.ParticipantsContestController(contest)[source]

Bases: oioioi.programs.controllers.ProgrammingContestController

Contains the contest logic and rules.

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

registration_controller()[source]
class oioioi.participants.tests.OnsiteContestController(contest)[source]

Bases: oioioi.programs.controllers.ProgrammingContestController

Contains the contest logic and rules.

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

class oioioi.participants.tests.TestParticipantsContestViews(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_participants_contest_visibility()[source]
test_participants_contest_access()[source]
class oioioi.participants.tests.TestParticipantsSubmit(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'][source]
test_submit_permissions()[source]
class oioioi.participants.tests.TestParticipantsRegistration(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_participants_accounts_menu()[source]
test_participants_registration()[source]
test_participants_unregister()[source]
class oioioi.participants.tests.TestOpenParticipantsRegistration(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_participants_registration()[source]
test_contest_info()[source]
class oioioi.participants.tests.NoAdminParticipantsRegistrationController(contest)[source]

Bases: oioioi.participants.controllers.ParticipantsController

A base class for classes which should have a list of subclasses available.

The list of subclasses is available in their subclasses class attributes. Classes which have explicitly set abstract class attribute to True are not added to subclasses.

If a class has modules_with_subclasses attribute (list or string), then specified modules for all installed applications can be loaded by calling load_subclasses().

property participant_admin[source]
class oioioi.participants.tests.NoAdminParticipantsContestController(contest)[source]

Bases: oioioi.programs.controllers.ProgrammingContestController

Contains the contest logic and rules.

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

registration_controller()[source]
class oioioi.participants.tests.TestOnsiteAdmin(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_admin_menu()[source]
test_regions_admin()[source]
test_participants_import()[source]
class oioioi.participants.tests.TestParticipantsModelAdmin(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_permissions'][source]
test_participants_admin_visibility()[source]
test_noadmin_admin_visibility()[source]
test_participants_import()[source]
class oioioi.participants.tests.TestParticipantsExclusiveContestsMiddlewareMixin(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, oioioi.contestexcl.tests.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_participants_selector()[source]
test_contest_admin_with_participant()[source]
class oioioi.participants.tests.TestRegistrationModel(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_both_hands_cascading_on_registration_delete()[source]
class oioioi.participants.tests.AnonymousRegistrationController(contest)[source]

Bases: oioioi.oi.controllers.OIRegistrationController

A base class for classes which should have a list of subclasses available.

The list of subclasses is available in their subclasses class attributes. Classes which have explicitly set abstract class attribute to True are not added to subclasses.

If a class has modules_with_subclasses attribute (list or string), then specified modules for all installed applications can be loaded by calling load_subclasses().

allow_login_as_public_name()[source]

Determines if participants may choose to stay anonymous, i.e. use their logins as public names.

class oioioi.participants.tests.AnonymousContestController(contest)[source]

Bases: oioioi.oi.controllers.OIContestController

Contains the contest logic and rules.

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

registration_controller()[source]
class oioioi.participants.tests.TestAnonymousParticipants(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_schools', 'test_full_package', 'test_problem_instance',...[source]
_register(user, anonymous=False, possible=False)[source]
test_no_anonymous_participants()[source]
test_anonymous_participants()[source]
test_user_info_page()[source]
class oioioi.participants.tests.TestParticipantsDataViews(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_schools'][source]
register(contest)[source]
test_no_email_data_view()[source]
test_data_view()[source]
test_none_school()[source]
class oioioi.participants.tests.TestOnsiteViews(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_contest_visibility()[source]
test_contest_access()[source]
class oioioi.participants.tests.TestOnsiteRegistration(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_missing_registration_model()[source]
test_participants_accounts_menu()[source]
test_participants_unregister_forbidden()[source]
class oioioi.participants.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_permissions'][source]
test_onsite_user_info_page()[source]