Permalink
Browse files

add test for redirect

  • Loading branch information...
1 parent 1b8c2f8 commit 392b48cfa50838810b7a1f69a8031cd8642ada89 @fivethreeo committed Sep 24, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 cmsplugin_blog/tests/__init__.py
@@ -294,11 +294,11 @@ def test_01_redirect_existing_language(self):
published_at = datetime.datetime(2011, 8, 31, 11, 0)
title, entry = self.create_entry_with_title(published=True,
published_at=published_at, language='de')
-
- response = self.client.get(u'/test-page-1/2011/08/31/entry-title/')
- self.assertRecirects(response, u'/test-page-1/2011/08/31/entry-title/')
- entry.delete()
- with SettingsOverride(DEBUG=True):
+
+ with SettingsOverride(DEBUG=True):
+ response = self.client.get(u'/test-page-1/2011/08/31/entry-title/')
+ self.assertRecirects(response, u'/test-page-1/2011/08/31/entry-title/')
+ entry.delete()
response = self.client.get(entry.get_absolute_url(), u'/test-page-1/2011/08/31/entry-title/')
self.assertRaises(response, Http404)

0 comments on commit 392b48c

Please sign in to comment.