Skip to content

Commit d16456a

Browse files
committed
[tests] Fixed failing test
1 parent cf33a08 commit d16456a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

openwisp_ipam/tests/test_admin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import json
22

3+
import django
34
from django.contrib.auth import get_user_model
45
from django.contrib.auth.models import Group
56
from django.core.files.uploadedfile import SimpleUploadedFile
@@ -509,7 +510,6 @@ def test_org_admin_create_shared_ip(self):
509510
},
510511
model=IpAddress,
511512
error_message=(
512-
'<ul class="errorlist" id="id_ip_address_error">'
513-
"<li>This field is required.</li></ul>"
514-
),
513+
'<ul class="errorlist"{}><li>This field is required.</li></ul>'
514+
).format(' id="id_ip_address_error"' if django.VERSION >= (5, 2) else ""),
515515
)

0 commit comments

Comments
 (0)