def test_get_number(self): query = self.get_query() data = Dal._Data(query) number = data.get_number() self.assertEqual(number[0], 1) self.assertEqual(number[1], 2)
def test_get_route_set_id(self): query = self.get_query() data = Dal._Data(query) id = data.get_route_set_id() self.assertEqual(id[0], 1)
def test_get_count(self): query = self.get_query() data = Dal._Data(query) count = data.get_count() self.assertEqual(count, 2)
def test_get_up_date(self): query = self.get_query() erd = Dal._Data(query) up_date = erd.get_up_date() up_date_exp = datetime.strptime('01/02/1989', "%d/%m/%Y").date() self.assertEqual(up_date[0], up_date_exp)
def test_get_down_date(self): query = self.get_query() erd = Dal._Data(query) down_date = erd.get_down_date() down_date_exp = None self.assertEqual(down_date[0], down_date_exp)
def test_get_grade_sub(self): query = self.get_query() erd = Dal._Data(query) grade_sub = erd.get_grade_sub() self.assertEqual(grade_sub[0], 'high')
def test_get_grade(self): query = self.get_query() erd = Dal._Data(query) colour = erd.get_grade() self.assertEqual(colour[0], 'orange')