Skip to content

Commit

Permalink
fix unit tests for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
llazzaro committed May 30, 2016
1 parent 8872280 commit df5e037
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def test_occurences_api_returns_the_expected_occurences(self):
))
self.assertEqual(self.response.status_code, 200)
expected_content = [{u'existed': False, u'end': u'2008-01-05T09:00:00+00:00', u'description': None, u'creator': u'None', u'color': None, u'title': u'Recent Event', u'rule': u'', u'event_id': 8, u'end_recurring_period': u'2008-05-05T00:00:00+00:00', u'cancelled': False, u'calendar': u'MyCalSlug', u'start': u'2008-01-05T08:00:00+00:00', u'id': 9}]
self.assertEquals(json.loads(self.response.content), expected_content)
self.assertEquals(json.loads(self.response.content.decode()), expected_content)

def test_occurences_api_without_parameters_return_status_400(self):
self.response = self.client.get(reverse("api_occurences"))
Expand Down Expand Up @@ -207,7 +207,7 @@ def test_occurences_api_checks_valid_occurrence_ids(self):
))
self.assertEqual(self.response.status_code, 200)
expected_content = [{u'existed': False, u'end': u'2008-01-05T09:00:00+00:00', u'description': None, u'creator': u'None', u'color': None, u'title': u'Recent Event', u'rule': u'', u'event_id': 8, u'end_recurring_period': u'2008-01-08T00:00:00+00:00', u'cancelled': False, u'calendar': u'MyCalSlug', u'start': u'2008-01-05T08:00:00+00:00', u'id': 10}, {u'existed': False, u'end': u'2008-01-06T09:00:00+00:00', u'description': None, u'creator': u'None', u'color': None, u'title': u'Recent Event', u'rule': u'', u'event_id': 8, u'end_recurring_period': u'2008-01-08T00:00:00+00:00', u'cancelled': False, u'calendar': u'MyCalSlug', u'start': u'2008-01-06T08:00:00+00:00', u'id': 10}, {u'existed': False, u'end': u'2008-01-07T09:00:00+00:00', u'description': None, u'creator': u'None', u'color': None, u'title': u'Recent Event', u'rule': u'', u'event_id': 8, u'end_recurring_period': u'2008-01-08T00:00:00+00:00', u'cancelled': False, u'calendar': u'MyCalSlug', u'start': u'2008-01-07T08:00:00+00:00', u'id': 10}, {u'existed': True, u'end': u'2008-01-07T08:00:00+00:00', u'description': u'Persisted occ test', u'creator': u'None', u'color': None, u'title': u'My persisted Occ', u'rule': u'', u'event_id': 8, u'end_recurring_period': u'2008-01-08T00:00:00+00:00', u'cancelled': False, u'calendar': u'MyCalSlug', u'start': u'2008-01-07T08:00:00+00:00', u'id': 1}]
self.assertEquals(json.loads(self.response.content), expected_content)
self.assertEquals(json.loads(self.response.content.decode()), expected_content)

def test_occurences_api_works_with_and_without_cal_slug(self):
# create a calendar and event
Expand Down

0 comments on commit df5e037

Please sign in to comment.