oioioi.printing.tests

Module Contents

Classes

PrintingTestContestController

Contains the contest logic and rules.

TestPDFGenerator

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

TestPrintingView

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

Attributes

oioioi.printing.tests.SAMPLE_TEXT[source]
class oioioi.printing.tests.PrintingTestContestController(contest)[source]

Bases: oioioi.contests.controllers.ContestController

Contains the contest logic and rules.

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

can_print_files(request)[source]
class oioioi.printing.tests.TestPDFGenerator(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_pdf_generation()[source]
class oioioi.printing.tests.TestPrintingView(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]
setUp()[source]

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

print_file(content)[source]
test_print()[source]
test_page_limit()[source]
test_file_size_limit()[source]