Skip to content

Commit

Permalink
Fix tests running in tox for Django 4.8
Browse files Browse the repository at this point in the history
In Django 4.8 there is a change to the tests need as the date widget
was added - `admin/widgets/date.html`.

Also removing the package `importlib-metadata` as that no longer seems
to be needed and breaks when running tox locally or in GHA.
  • Loading branch information
PacificGilly committed Mar 21, 2024
1 parent 519bbe6 commit bf9c561
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ deps =
black
beautifulsoup4
dj-database-url
importlib-metadata==4.13.0
factory-boy
django2: Django<3
django3: Django<4
Expand Down
2 changes: 2 additions & 0 deletions tests/test_admin_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def test_detail(admin_client):
{
"django/forms/div.html": 1,
"django/forms/errors/list/default.html": 2,
"admin/widgets/date.html": 3,
"django/forms/errors/list/ul.html": 56,
}
)
Expand Down Expand Up @@ -264,6 +265,7 @@ def test_detail(admin_client):
{
"django/forms/div.html",
"django/forms/errors/list/default.html",
"admin/widgets/date.html",
"django/forms/errors/list/ul.html",
}
)
Expand Down

0 comments on commit bf9c561

Please sign in to comment.