Skip to content

Commit 0ff9afb

Browse files
committed
fix django tests
1 parent e5be77e commit 0ff9afb

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

tests/assets/django/settings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@
9191

9292
USE_I18N = True
9393

94-
USE_L10N = True
95-
9694
USE_TZ = True
9795

9896

tests/assets/django/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django.contrib import admin
2-
from django.urls import path # type:ignore
2+
from django.urls import path
33

44
urlpatterns = [
55
path("admin/", admin.site.urls),

tests/test_playwright.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import os
16+
from pathlib import Path
1617
import sys
1718

1819
import pytest
@@ -438,6 +439,8 @@ def test_base_url(page):
438439

439440

440441
def test_django(testdir: pytest.Testdir) -> None:
442+
# Workaroud for https://github.com/pytest-dev/pytest/issues/10651
443+
os.environ.setdefault("PYTHONPATH", str(Path(__file__).parent.parent))
441444
testdir.makepyfile(
442445
"""
443446
from django.test import TestCase

0 commit comments

Comments
 (0)