def test_conflicts_with_self(self): section = SectionFactory.build() self.assertTrue(section.conflicts_with(section))
def test_seats_left(self): section = SectionFactory.build(seats_taken=4, seats_total=5) self.assertEqual(section.seats_left, 1)
def test_seats_left_should_never_be_negative(self): section = SectionFactory.build(seats_taken=7, seats_total=5) self.assertEqual(section.seats_left, 0)
def test_is_not_full(self): section = SectionFactory.build() self.assertFalse(section.is_full)
def test_is_full(self): section = SectionFactory.build(seats_taken=2, seats_total=2) self.assertTrue(section.is_full)
def test_is_not_study_abroad(self): section = SectionFactory.build() self.assertFalse(section.is_study_abroad)
def test_is_study_abroad(self): section = SectionFactory.build(number=models.Section.STUDY_ABROAD) self.assertTrue(section.is_study_abroad)
def test_seats_left_should_never_be_negative(self): section = SectionFactory.build(seats_taken=7, seats_total=5) self.assertEqual(section.seats_left, 0)
def test_conflicts_with_self(self): section = SectionFactory.build() self.assertTrue(section.conflicts_with(section))
def test_seats_left(self): section = SectionFactory.build(seats_taken=4, seats_total=5) self.assertEqual(section.seats_left, 1)
def test_is_full(self): section = SectionFactory.build(seats_taken=2, seats_total=2) self.assertTrue(section.is_full)
def test_is_not_full(self): section = SectionFactory.build() self.assertFalse(section.is_full)
def test_is_study_abroad(self): section = SectionFactory.build(number=models.Section.STUDY_ABROAD) self.assertTrue(section.is_study_abroad)
def test_is_not_study_abroad(self): section = SectionFactory.build() self.assertFalse(section.is_study_abroad)