oioioi.suspendjudge.tests

Module Contents

Classes

TestSuspendjudgeSuper

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

TestViews

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

TestSuspending

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

class oioioi.suspendjudge.tests.TestSuspendjudgeSuper(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.

_empty_post(login, view, problem_instance)[source]
class oioioi.suspendjudge.tests.TestViews(methodName='runTest')[source]

Bases: TestSuspendjudgeSuper

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_instance'][source]
test_views_permissions()[source]
class oioioi.suspendjudge.tests.TestSuspending(methodName='runTest')[source]

Bases: TestSuspendjudgeSuper

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_handler_presence()[source]
test_handler()[source]