oioioi.mp.tests

Module Contents

Classes

TestFloatScore

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

TestMPRanking

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

TestSubmissionScoreMultiplier

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

class oioioi.mp.tests.TestFloatScore(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_float_score()[source]
class oioioi.mp.tests.TestMPRanking(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_mp_users', 'test_mp_contest', 'test_mp_rankings'][source]
_ranking_url(key='c')[source]
_check_order(response, expected)[source]
test_rounds_order()[source]
test_columns_order()[source]
test_no_zero_scores_in_ranking()[source]
class oioioi.mp.tests.TestSubmissionScoreMultiplier(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.

_create_result(pi)[source]
test_results_scores()[source]