Skip to content

Commit

Permalink
add test for redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
fivethreeo committed Sep 24, 2011
1 parent 1b8c2f8 commit 392b48c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmsplugin_blog/tests/__init__.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ def test_01_redirect_existing_language(self):
published_at = datetime.datetime(2011, 8, 31, 11, 0) published_at = datetime.datetime(2011, 8, 31, 11, 0)
title, entry = self.create_entry_with_title(published=True, title, entry = self.create_entry_with_title(published=True,
published_at=published_at, language='de') published_at=published_at, language='de')

response = self.client.get(u'/test-page-1/2011/08/31/entry-title/') with SettingsOverride(DEBUG=True):
self.assertRecirects(response, u'/test-page-1/2011/08/31/entry-title/') response = self.client.get(u'/test-page-1/2011/08/31/entry-title/')
entry.delete() self.assertRecirects(response, u'/test-page-1/2011/08/31/entry-title/')
with SettingsOverride(DEBUG=True): entry.delete()
response = self.client.get(entry.get_absolute_url(), u'/test-page-1/2011/08/31/entry-title/') response = self.client.get(entry.get_absolute_url(), u'/test-page-1/2011/08/31/entry-title/')
self.assertRaises(response, Http404) self.assertRaises(response, Http404)


Expand Down

0 comments on commit 392b48c

Please sign in to comment.