Skip to content

Commit a0dc651

Browse files
committed
Fix faulty templatetag test
1 parent 147e8d1 commit a0dc651

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

openinghours/tests/test_templatetags.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,21 @@ def test_get_closing_rule_for_now(self):
7171
with freeze_time("2016-02-22 10:00:00"):
7272
self.assertFalse(get_closing_rule_for_now(self.company))
7373

74-
def opening_hours(self):
74+
def test_opening_hours(self):
7575
with freeze_time("2016-02-22 08:00:00"): # Monday
7676
opening_hours_str = opening_hours(self.company)
77-
self.assertIn(u'Monday:', opening_hours_str)
78-
self.assertIn(u'Tuesday:', opening_hours_str)
79-
self.assertIn(u'Wednesday:', opening_hours_str)
80-
self.assertIn(u'Thursday:', opening_hours_str)
81-
self.assertIn(u'Friday:', opening_hours_str)
82-
self.assertIn(u'Saturday:', opening_hours_str)
83-
self.assertIn(u'Sunday:', opening_hours_str)
77+
self.assertIn(u'Monday', opening_hours_str)
78+
self.assertIn(u'Tuesday', opening_hours_str)
79+
self.assertIn(u'Wednesday', opening_hours_str)
80+
self.assertIn(u'Thursday', opening_hours_str)
81+
self.assertIn(u'Friday', opening_hours_str)
82+
self.assertIn(u'Saturday', opening_hours_str)
83+
self.assertIn(u'Sunday', opening_hours_str)
8484
self.assertIn(u'8:30am to 12:00pm', opening_hours_str)
85-
self.assertIn(u'9:00am to 17:00pm', opening_hours_str)
86-
self.assertIn(u'10:00am to 13:00pm', opening_hours_str)
87-
self.assertIn(u'12:30am to 22:00pm', opening_hours_str)
88-
self.assertIn(u'12:30am to 18:00pm', opening_hours_str)
89-
self.assertIn(u'18:30am to 22:00pm', opening_hours_str)
85+
self.assertIn(u'9:00am to 5:00pm', opening_hours_str)
86+
self.assertIn(u'10:00am to 1:00pm', opening_hours_str)
87+
self.assertIn(u'12:30pm to 10:00pm', opening_hours_str)
88+
self.assertIn(u'12:30pm to 6:00pm', opening_hours_str)
89+
self.assertIn(u'6:30pm to 10:00pm', opening_hours_str)
9090
self.assertNotIn(u'2:30am to 4:00am', opening_hours_str)
91+
print(opening_hours_str)

0 commit comments

Comments
 (0)