From cb8c6b260ad9aaa2405010bdeeb45c2e5572de62 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Wed, 7 Mar 2018 11:15:55 -0500 Subject: [PATCH] fix test case when dining hall is closed --- tests/dining_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/dining_test.py b/tests/dining_test.py index 44500bc..7ac6f4f 100644 --- a/tests/dining_test.py +++ b/tests/dining_test.py @@ -18,7 +18,9 @@ def test_dining(self): self.assertTrue(len(venues) > 0) id = str(venues["id"]) data = self.din.menu_daily(id) - self.assertTrue(len(data["result_data"]["Document"]["tblMenu"]["tblDayPart"][0]) >= 2) + dayPart = data["result_data"]["Document"]["tblMenu"]["tblDayPart"] + if len(dayPart) > 0: + self.assertTrue(len(dayPart[0]) >= 2) def test_dining_normalization(self): data = self.din.menu_daily("593")