Skip to content

Commit 9f3fbe2

Browse files
committed
fix tests for django 5.2
1 parent 2e5b167 commit 9f3fbe2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/test_bootstrap_field_input_checkbox.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ def test_input_type_checkbox_is_invalid(self):
3030
)
3131
if DJANGO_VERSION >= "5":
3232
html = html.replace(' aria-invalid="true"', "")
33+
if DJANGO_VERSION >= "5.2":
34+
html = html.replace(' aria-describedby="id_test_error"', "")
3335
self.assertHTMLEqual(
3436
html,
3537
(

tests/test_bootstrap_field_input_text.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def test_input_type_text(self):
3333
html = self.render("{% bootstrap_field form.test %}", context={"form": form})
3434
if DJANGO_VERSION >= "5":
3535
html = html.replace(' aria-invalid="true"', "")
36+
if DJANGO_VERSION >= "5.2":
37+
html = html.replace(' aria-describedby="id_test_error"', "")
3638

3739
self.assertHTMLEqual(
3840
html,
@@ -187,6 +189,8 @@ def test_input_validation_failure(self):
187189
html = self.render('{% bootstrap_field form.test addon_before="foo" %}', context={"form": form})
188190
if DJANGO_VERSION >= "5":
189191
html = html.replace(' aria-invalid="true"', "")
192+
if DJANGO_VERSION >= "5.2":
193+
html = html.replace(' aria-describedby="id_test_error"', "")
190194

191195
self.assertHTMLEqual(
192196
html,

0 commit comments

Comments
 (0)