Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
As now redirecting to draft version if we go to public id in admin.
  • Loading branch information
johnsensible committed Nov 19, 2014
1 parent 73e5388 commit d26cbb0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions publish/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,11 +956,11 @@ class user(object):
def has_perm(cls, permission):
return True

try:
self.page_admin.change_view(dummy_request, unicode(self.page1.public.id))
self.fail()
except Http404:
pass
response = self.page_admin.change_view(dummy_request, unicode(self.page1.public.id))
# should be redirecting to the draft version
self.failUnless(response is not None)
self.assertEquals(302, response.status_code)
self.assertEquals('/admin/publish/page/%d/' % self.page1.id, response['Location'])

def test_change_view_deleted(self):
class dummy_request(object):
Expand Down

0 comments on commit d26cbb0

Please sign in to comment.