Skip to content

Commit 109ed08

Browse files
committed
Fix tests
1 parent 097720d commit 109ed08

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/test_admin_views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ def test_detail(admin_client):
208208
"admin/widgets/foreign_key_raw_id.html": 1,
209209
"admin/widgets/related_widget_wrapper.html": 4,
210210
"admin/widgets/split_datetime.html": 2,
211-
"django/forms/widgets/attrs.html": 47,
211+
"django/forms/widgets/attrs.html": 47 if django.VERSION < (5, 0, 0) else 49,
212212
"django/forms/widgets/date.html": 5,
213-
"django/forms/widgets/hidden.html": 6,
214-
"django/forms/widgets/input.html": 19,
213+
"django/forms/widgets/hidden.html": 6 if django.VERSION < (5, 0, 0) else 8,
214+
"django/forms/widgets/input.html": 19 if django.VERSION < (5, 0, 0) else 21,
215215
"django/forms/widgets/number.html": 1,
216216
"django/forms/widgets/select.html": 6,
217217
"django/forms/widgets/select_option.html": 21,

tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def parse_topmenu(response):
3636
anchor = li.find("a")
3737

3838
# Skip brand link and menu button
39-
if type(anchor.contents[0]) == Tag:
39+
if isinstance(anchor.contents[0], Tag):
4040
continue
4141

4242
item = {"name": anchor.text.strip(), "link": anchor["href"]}

0 commit comments

Comments
 (0)