def test_populate_timetable(self): tr.routes = [] tr.populate_timetable() if tr.get_today_timetable().count() > 0: self.assertGreater(len(tr.routes), 0) else: self.assertEqual(len(tr.routes), 0) print "Test - OK ... Timetable stored"
def test_get_today_timetable(self): self.assertEqual(str(type(tr.get_today_timetable())), "<class 'pymongo.cursor.Cursor'>") print "Test - OK ... Timetable accessed"