def testlink(self): r = Room(room_id=1234) r.save() d = datetime.now() h = History(link=1234,add_time = d,room = r) h.save() self.assertRaises(ValueError,h.save())
def test_add_time(self): r = Room(room_id=1234) r.save() d = "Hello" h = History(link="1234",add_time = d,room = r) with self.assertRaises(ValidationError): h.save()
def testRoom(self): r = Room(room_id=1234) r.save() d = datetime.now() h = History(link="test",add_time = d,room = r) h.save() self.assertTrue(1 == 1)