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('pages-root') except RuntimeError: self.fail('maximum recursion depth exceeded')
from cms.models import monkeypatch_reverse import haystack monkeypatch_reverse() haystack.autodiscover()