oioioi.problems.tests.test_problem_statistics

Module Contents

Classes

TestProblemStatistics

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

TestProblemStatisticsSpecialCases

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

TestProblemStatisticsDisplay

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

class oioioi.problems.tests.test_problem_statistics.TestProblemStatistics(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_full_package', 'test_contest', 'test_problem_instance',...[source]
test_statistics_updating()[source]
test_statistics_probleminstances()[source]
test_recalculate_statistics()[source]
class oioioi.problems.tests.test_problem_statistics.TestProblemStatisticsSpecialCases(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_full_package', 'test_contest', 'test_problem_instance',...[source]
test_statistics_null_score()[source]
test_statistics_zero_max_score()[source]
test_statistics_weird_scores()[source]
test_statistics_imported()[source]
class oioioi.problems.tests.test_problem_statistics.TestProblemStatisticsDisplay(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_statistics_display'][source]
problem_columns = ['short_name', 'name', 'submitted', 'solved_pc', 'avg_best_score', 'user_score'][source]
problem_data = [['aaa', 'Aaaa', '7', '14%', '50', None], ['bbb', 'Bbbb', '8', '25%', '45', '0'], ['ccc',...[source]
_get_table_contents(html)[source]
static _cmp_str_with_none(key_fn)[source]
_assert_rows_sorted(rows, order_by=0, desc=False)[source]
test_statistics_problem_list()[source]
test_statistics_sorting()[source]
test_statistics_nulls()[source]
test_statistics_sort_nulls()[source]
test_statistics_sorting_with_query()[source]