예제 #1
0
파일: models.py 프로젝트: Lucky1313/YACS
 def test_conflicts_with_self(self):
     section = SectionFactory.build()
     self.assertTrue(section.conflicts_with(section))
예제 #2
0
파일: models.py 프로젝트: Lucky1313/YACS
 def test_seats_left(self):
     section = SectionFactory.build(seats_taken=4, seats_total=5)
     self.assertEqual(section.seats_left, 1)
예제 #3
0
파일: models.py 프로젝트: Lucky1313/YACS
 def test_seats_left_should_never_be_negative(self):
     section = SectionFactory.build(seats_taken=7, seats_total=5)
     self.assertEqual(section.seats_left, 0)
예제 #4
0
파일: models.py 프로젝트: Lucky1313/YACS
 def test_is_not_full(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_full)
예제 #5
0
파일: models.py 프로젝트: Lucky1313/YACS
 def test_is_full(self):
     section = SectionFactory.build(seats_taken=2, seats_total=2)
     self.assertTrue(section.is_full)
예제 #6
0
파일: models.py 프로젝트: Lucky1313/YACS
 def test_is_not_study_abroad(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_study_abroad)
예제 #7
0
파일: models.py 프로젝트: Lucky1313/YACS
 def test_is_study_abroad(self):
     section = SectionFactory.build(number=models.Section.STUDY_ABROAD)
     self.assertTrue(section.is_study_abroad)
예제 #8
0
파일: models.py 프로젝트: TimeFinders/YAExS
 def test_seats_left_should_never_be_negative(self):
     section = SectionFactory.build(seats_taken=7, seats_total=5)
     self.assertEqual(section.seats_left, 0)
예제 #9
0
파일: models.py 프로젝트: TimeFinders/YAExS
 def test_conflicts_with_self(self):
     section = SectionFactory.build()
     self.assertTrue(section.conflicts_with(section))
예제 #10
0
파일: models.py 프로젝트: TimeFinders/YAExS
 def test_seats_left(self):
     section = SectionFactory.build(seats_taken=4, seats_total=5)
     self.assertEqual(section.seats_left, 1)
예제 #11
0
파일: models.py 프로젝트: TimeFinders/YAExS
 def test_is_full(self):
     section = SectionFactory.build(seats_taken=2, seats_total=2)
     self.assertTrue(section.is_full)
예제 #12
0
파일: models.py 프로젝트: TimeFinders/YAExS
 def test_is_not_full(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_full)
예제 #13
0
파일: models.py 프로젝트: TimeFinders/YAExS
 def test_is_study_abroad(self):
     section = SectionFactory.build(number=models.Section.STUDY_ABROAD)
     self.assertTrue(section.is_study_abroad)
예제 #14
0
파일: models.py 프로젝트: TimeFinders/YAExS
 def test_is_not_study_abroad(self):
     section = SectionFactory.build()
     self.assertFalse(section.is_study_abroad)