AKModel.tests.test_slot_duration module

class AKModel.tests.test_slot_duration.SlotDurationTests(methodName='runTest')[source]

Bases: TestCase

Tests for the restrictions of slot durations (positive, never longer than the event)

test_max_slot_duration()[source]

Test that the maximum slot duration is the event length, rounded down to the precision of the field and never more than can be stored in the duration field

test_save_clamps_duration()[source]

Test that saving a slot clamps its duration to the event length (without rounding to whole hours)

test_clean_rejects_non_positive_duration()[source]

Test that slots without a positive duration are rejected