oioioi.oisubmit.tests

Module Contents

Classes

OISubmitFileMixin

TestOISubmitSubmission

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

class oioioi.oisubmit.tests.OISubmitFileMixin[source]

Bases: object

submit_file(contest, pi_short_name, localtime=None, siotime=None, magickey='', file_size=1024, file_name='submission.cpp')[source]
_assertSubmitted(response, submission_number)[source]
_assertNotSubmitted(response, submission_number)[source]
_assertSuspected(response, submission_number, suspected_number, reason)[source]
_assertNotSuspected(response, submission_number, suspected_number)[source]
_assertFormError(response, submission_number, error)[source]
class oioioi.oisubmit.tests.TestOISubmitSubmission(methodName='runTest')[source]

Bases: oioioi.base.tests.TestCase, OISubmitFileMixin

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

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

test_simple_submission()[source]
test_huge_submission()[source]
test_size_limit_accuracy()[source]
test_submissions_limitation()[source]
_assertUnsupportedExtension(contest, pi, name, ext)[source]
test_extension_checking()[source]
test_submission_form()[source]