Removed 'tests' path prefix in a couple tests.
This commit is contained in:
parent
1b3a949ba2
commit
694cf458f1
|
@ -2358,7 +2358,7 @@ class WatchForTranslationChangesTests(SimpleTestCase):
|
|||
|
||||
def test_i18n_app_dirs(self):
|
||||
mocked_sender = mock.MagicMock()
|
||||
with self.settings(INSTALLED_APPS=["tests.i18n.sampleproject"]):
|
||||
with self.settings(INSTALLED_APPS=["i18n.sampleproject"]):
|
||||
watch_for_translation_changes(mocked_sender)
|
||||
project_dir = Path(__file__).parent / "sampleproject" / "locale"
|
||||
mocked_sender.watch_dir.assert_any_call(project_dir, "**/*.mo")
|
||||
|
|
|
@ -915,9 +915,9 @@ class CookieSessionTests(SessionTestsMixin, SimpleTestCase):
|
|||
class ClearSessionsCommandTests(SimpleTestCase):
|
||||
def test_clearsessions_unsupported(self):
|
||||
msg = (
|
||||
"Session engine 'tests.sessions_tests.no_clear_expired' doesn't "
|
||||
"Session engine 'sessions_tests.no_clear_expired' doesn't "
|
||||
"support clearing expired sessions."
|
||||
)
|
||||
with self.settings(SESSION_ENGINE="tests.sessions_tests.no_clear_expired"):
|
||||
with self.settings(SESSION_ENGINE="sessions_tests.no_clear_expired"):
|
||||
with self.assertRaisesMessage(management.CommandError, msg):
|
||||
management.call_command("clearsessions")
|
||||
|
|
|
@ -44,7 +44,7 @@ from .views import TwoArgException, get_view, post_view, trace_view
|
|||
|
||||
def middleware_urlconf(get_response):
|
||||
def middleware(request):
|
||||
request.urlconf = "tests.test_client.urls_middleware_urlconf"
|
||||
request.urlconf = "test_client.urls_middleware_urlconf"
|
||||
return get_response(request)
|
||||
|
||||
return middleware
|
||||
|
@ -53,7 +53,7 @@ def middleware_urlconf(get_response):
|
|||
@async_only_middleware
|
||||
def async_middleware_urlconf(get_response):
|
||||
async def middleware(request):
|
||||
request.urlconf = "tests.test_client.urls_middleware_urlconf"
|
||||
request.urlconf = "test_client.urls_middleware_urlconf"
|
||||
return await get_response(request)
|
||||
|
||||
return middleware
|
||||
|
|
Loading…
Reference in New Issue