Ejemplo n.º 1
0
 def test_conflicts_with_self(self):
     section = SectionFactory.build()
     self.assertTrue(section.conflicts_with(section))
Ejemplo n.º 2
0
 def test_seats_left(self):
     section = SectionFactory.build(seats_taken=4, seats_total=5)
     self.assertEqual(section.seats_left, 1)
Ejemplo n.º 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)
Ejemplo n.º 4
0
 def test_is_not_full(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_full)
Ejemplo n.º 5
0
 def test_is_full(self):
     section = SectionFactory.build(seats_taken=2, seats_total=2)
     self.assertTrue(section.is_full)
Ejemplo n.º 6
0
 def test_is_not_study_abroad(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_study_abroad)
Ejemplo n.º 7
0
 def test_is_study_abroad(self):
     section = SectionFactory.build(number=models.Section.STUDY_ABROAD)
     self.assertTrue(section.is_study_abroad)
Ejemplo n.º 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)
Ejemplo n.º 9
0
 def test_conflicts_with_self(self):
     section = SectionFactory.build()
     self.assertTrue(section.conflicts_with(section))
Ejemplo n.º 10
0
 def test_seats_left(self):
     section = SectionFactory.build(seats_taken=4, seats_total=5)
     self.assertEqual(section.seats_left, 1)
Ejemplo n.º 11
0
 def test_is_full(self):
     section = SectionFactory.build(seats_taken=2, seats_total=2)
     self.assertTrue(section.is_full)
Ejemplo n.º 12
0
 def test_is_not_full(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_full)
Ejemplo n.º 13
0
 def test_is_study_abroad(self):
     section = SectionFactory.build(number=models.Section.STUDY_ABROAD)
     self.assertTrue(section.is_study_abroad)
Ejemplo n.º 14
0
 def test_is_not_study_abroad(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_study_abroad)