oioioi.plagiarism.tests

Module Contents

Classes

TestMossClient

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

TestMossSubmitCommand

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

TestMossSubmitView

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

Attributes

oioioi.plagiarism.tests.SAMPLE_RESULTS_URL = http://moss.stanford.edu/results/10/123456789[source]
oioioi.plagiarism.tests.ALWAYS_OK_SUBMIT[source]
class oioioi.plagiarism.tests.TestMossClient(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.

test_connection_refused()[source]
test_moss_query_rejection()[source]
class oioioi.plagiarism.tests.TestMossSubmitCommand(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_export()[source]
test_no_submissions()[source]
test_adding_files()[source]
class oioioi.plagiarism.tests.TestMossSubmitView(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]
MOSS_SUBMIT_URL = /c/c/moss_submit/[source]
test_submit()[source]