Ejemplo n.º 1
0
    def testAssignmentisValid(self):
        assi = Assignment("234" , "" , "4" , "6")
        assert assi.isValid() == False

        assi = Assignment("234" , "this blows" , "4" , "")
        assert assi.isValid() == False

        assi = Assignment("" , "this blows" , "4" , "6")
        assert assi.isValid() == False

        assi = Assignment("234" , "this blows" , "" , "")
        assert len(assi.getErrors()) == 2

        assi = Assignment("" , "" , "4" , "")
        assert len(assi.getErrors()) == 3
Ejemplo n.º 2
0
 def testIsValid(self):
     asg = Assignment('', '' , '4', 5)
     assert asg.isValid() == False
     assert asg.getDeadline() != ''