Skip to content

Commit 7e30f8c

Browse files
committed
[tests] Fix NoReverseMatch in malformed URL tests #682
Updated history URL resolution to use admin_urlname for compatibility across different admin namespaces in the CI environment. Fixes #682
1 parent 8a96299 commit 7e30f8c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

openwisp_controller/config/tests/test_admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ def test_malformed_admin_urls_return_404(self):
14361436
)
14371437

14381438
# HISTORY URL (kept as existing explicit admin name)
1439-
history_url_name = f"admin:{model_admin_name}_history"
1439+
history_url_name = admin_urlname(model_map[model_name]._meta, "history")
14401440
valid_history_url = reverse(history_url_name, args=[valid_pk])
14411441
malformed_history_url = f"{valid_history_url}{junk_path}"
14421442

0 commit comments

Comments
 (0)