Example #1
0
    def test_course_registration_fail(self):
        fixtures.correct_instantiation(self.st)
        students = list(self.db._tables["student"].values())

        ret2 = students[1].course_registration(self.db, 2, [0, 2])

        self.db.clear()
        self.assertFalse(ret2)
Example #2
0
    def test_course_registration_pass(self):
        fixtures.correct_instantiation(self.st)
        students = list(self.db._tables["student"].values())

        ret1 = students[0].course_registration(self.db, 2, [0, 1])

        self.db.clear()
        self.assertTrue(ret1)
Example #3
0
    def test_student_registration_pass(self):
        fixtures.correct_instantiation(self.st)
        depts = list(self.db._tables["department"].values())
        students = list(self.db._tables["student"].values())

        ret1 = students[0].register(self.db, 2, "DU14012341")
        # ret2 = students[1].register(self.db, 2, "")

        self.assertTrue(ret1)
Example #4
0
    def test_correct_instantiation(self):
        fixtures.correct_instantiation(self.st)

        valid = True
        for name in self.table_names:
            if len(self.db._tables[name]) != self.table_sizes[name]:
                valid = False
                break

        self.db.clear()
        self.assertTrue(valid)
Example #5
0
 def setUp(self):
     fixtures.correct_instantiation(self.st, "notimings")
Example #6
0
 def setUp(self):
     fixtures.correct_instantiation(self.st)