oioioi.simpleui.tests

Module Contents

Classes

TestContestDashboard

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

TestUserDashboard

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

TestProblemInstance

Abstract base class with login utility for problem instance tests classes.

TestProblemInstanceSettings

Abstract base class with login utility for problem instance tests classes.

TestProblemInstanceValidation

Abstract base class with login utility for problem instance tests classes.

Functions

oioioi.simpleui.tests.change_contest_type(contest)[source]
class oioioi.simpleui.tests.TestContestDashboard(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_messages',...[source]
compile_flags[source]
test_contest_dashboard()[source]
test_open_contest_dashboard()[source]
test_not_open_contest_dashboard()[source]
test_contest_dashboard_lacking_permissions()[source]
test_contest_dashboard_no_rounds()[source]
class oioioi.simpleui.tests.TestUserDashboard(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_messages',...[source]
compile_flags[source]
test_permissions()[source]
test_permissions_invisible()[source]
test_user_dashboard()[source]
test_user_dashboard_empty()[source]
test_user_dashboard_full()[source]
class oioioi.simpleui.tests.TestProblemInstance(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase

Abstract base class with login utility for problem instance tests classes.

login(get_problems)[source]
class oioioi.simpleui.tests.TestProblemInstanceSettings(methodName='runTest')[source]

Bases: TestProblemInstance

Abstract base class with login utility for problem instance tests classes.

fixtures = ['test_users', 'teachers', 'test_contest', 'test_full_package', 'test_problem_instance',...[source]
form_data[source]
test_test_settings_ok()[source]
test_time_limit()[source]
test_memory_limit()[source]
class oioioi.simpleui.tests.TestProblemInstanceValidation(methodName='runTest')[source]

Bases: TestProblemInstance

Abstract base class with login utility for problem instance tests classes.

fixtures = ['test_users', 'teachers', 'test_contest', 'test_full_package', 'test_problem_instance'][source]
form_data[source]
test_max_scores()[source]