Permalink
Browse files

made the test fail directly, instead of just ruining `reverse` for th…

…e following tests
  • Loading branch information...
1 parent 6effa47 commit 1a49a95d3d04c9239d6c79c81c70bf46f102355b @piquadrat piquadrat committed Feb 18, 2011
Showing with 8 additions and 1 deletion.
  1. +8 −1 cms/tests/multilingual.py
@@ -64,7 +64,14 @@ def test_02_multilingual_page(self):
self.assertEqual(placeholder.cmsplugin_set.filter(language='en').count(), 1)
def test_03_multiple_reverse_monkeypatch(self):
+ """
+ This test is not very well behaved, every following
+ test that uses reverse will fail with a RuntimeException.
+ """
from cms.models import monkeypatch_reverse
monkeypatch_reverse()
monkeypatch_reverse()
-
+ try:
+ reverse('foobar')
+ except RuntimeError:
+ self.fail('maximum recursion depth exceeded')

0 comments on commit 1a49a95

Please sign in to comment.