コード例 #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)