Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add test for redirect

  • Loading branch information...
commit cfbda158120b409a532eaa8e92cd753304601741 1 parent 369313a
@fivethreeo authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 cmsplugin_blog/tests/__init__.py
View
9 cmsplugin_blog/tests/__init__.py
@@ -296,11 +296,12 @@ def test_01_redirect_existing_language(self):
published_at=published_at, language='de')
with SettingsOverride(DEBUG=True):
- response = self.client.get(u'/test-page-1/2011/08/31/entry-title/')
- self.assertRedirects(response, u'/test-page-1/2011/08/31/entry-title/')
+ response = self.client.get(u'/en/test-page-1/2011/08/31/entry-title/')
+ self.assertRedirects(response, u'/en/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)
+ with SettingsOverride(LANGUAGE_CODE='en'):
+ response = self.client.get(u'/de/test-page-1/2011/08/31/entry-title/')
+ self.assertRaises(response, Http404)
class LatestEntriesTestCase(BaseBlogTestCase):
Please sign in to comment.
Something went wrong with that request. Please try again.