Beispiel #1
0
 def test_conflicts_with_self(self):
     section = SectionFactory.build()
     self.assertTrue(section.conflicts_with(section))
Beispiel #2
0
 def test_seats_left(self):
     section = SectionFactory.build(seats_taken=4, seats_total=5)
     self.assertEqual(section.seats_left, 1)
Beispiel #3
0
 def test_seats_left_should_never_be_negative(self):
     section = SectionFactory.build(seats_taken=7, seats_total=5)
     self.assertEqual(section.seats_left, 0)
Beispiel #4
0
 def test_is_not_full(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_full)
Beispiel #5
0
 def test_is_full(self):
     section = SectionFactory.build(seats_taken=2, seats_total=2)
     self.assertTrue(section.is_full)
Beispiel #6
0
 def test_is_not_study_abroad(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_study_abroad)
Beispiel #7
0
 def test_is_study_abroad(self):
     section = SectionFactory.build(number=models.Section.STUDY_ABROAD)
     self.assertTrue(section.is_study_abroad)
Beispiel #8
0
 def test_seats_left_should_never_be_negative(self):
     section = SectionFactory.build(seats_taken=7, seats_total=5)
     self.assertEqual(section.seats_left, 0)
Beispiel #9
0
 def test_conflicts_with_self(self):
     section = SectionFactory.build()
     self.assertTrue(section.conflicts_with(section))
Beispiel #10
0
 def test_seats_left(self):
     section = SectionFactory.build(seats_taken=4, seats_total=5)
     self.assertEqual(section.seats_left, 1)
Beispiel #11
0
 def test_is_full(self):
     section = SectionFactory.build(seats_taken=2, seats_total=2)
     self.assertTrue(section.is_full)
Beispiel #12
0
 def test_is_not_full(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_full)
Beispiel #13
0
 def test_is_study_abroad(self):
     section = SectionFactory.build(number=models.Section.STUDY_ABROAD)
     self.assertTrue(section.is_study_abroad)
Beispiel #14
0
 def test_is_not_study_abroad(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_study_abroad)