Skip to content

Commit

Permalink
ci: Add stacklevel to test check on mock assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
marksweb committed May 10, 2023
1 parent c0247cc commit 09df193
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def test_register_versionadmin_proxy_warning(self):
with patch.object(warnings, "warn") as mock:
register_versionadmin_proxy(versionable, site)
message = f"{Version!r} is already registered with admin."
mock.assert_called_with(message, UserWarning)
mock.assert_called_with(message, UserWarning, stacklevel=2)


class VersionAdminTestCase(CMSTestCase):
Expand Down

0 comments on commit 09df193

Please sign in to comment.