File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2
2
from django .core .exceptions import ValidationError
3
3
from django .template import Context , Template
4
4
5
- from feincms3 .applications import (
6
- apps_urlconf ,
7
- )
5
+ from feincms3 .applications import _del_apps_urlconf_cache , apps_urlconf
8
6
from feincms3 .templatetags .feincms3 import translations , translations_from
9
7
from testapp .models import Page , TranslatedArticle
10
8
from testapp .utils import override_urlconf
@@ -61,6 +59,8 @@ def test_language_and_translation_of_mixin():
61
59
@pytest .mark .django_db
62
60
def test_language_and_translation_of_mixin_in_app ():
63
61
"""LanguageAndTranslationOfMixin when used within a feincms3 app"""
62
+ _del_apps_urlconf_cache ()
63
+
64
64
p = Page .objects .create (
65
65
title = "home-en" ,
66
66
slug = "home-en" ,
@@ -89,6 +89,7 @@ def test_language_and_translation_of_mixin_in_app():
89
89
language ["object" ] for language in translations (original .translations ())
90
90
] == [original , translated , None ]
91
91
92
+ assert apps_urlconf () != "testapp.urls"
92
93
with override_urlconf (apps_urlconf ()):
93
94
assert original .get_absolute_url () == f"/home-en/{ original .pk } /"
94
95
assert translated .get_absolute_url () == f"/home-de/{ translated .pk } /"
You can’t perform that action at this time.
0 commit comments