Skip to content

Commit

Permalink
fix ruff rule C408
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaellasuardini committed Feb 1, 2024
1 parent 5d7d389 commit 443f67b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_current_site_name(self):
current_site_name,
)

site_name = current_site_name(dict())
site_name = current_site_name({})
self.assertEqual(site_name, "example.com") # Default name

with self.modify_settings(
Expand All @@ -26,22 +26,20 @@ def test_current_site_name(self):
],
}
):
site_name = current_site_name(dict())
site_name = current_site_name({})
self.assertEqual(site_name, "my site") # Generic name

def test_render_update_notification(self):
from djangocms_admin_style.templatetags.admin_style_tags import (
render_update_notification,
)

self.assertEqual(
render_update_notification(dict()), ""
) # No update notification
self.assertEqual(render_update_notification({}), "") # No update notification

request = self.request_factory.get("/")
request.resolver_match = Object()
request.resolver_match.url_name = "index"
self.assertIn(
f'<meta name="djangocms_version" content="{cms.__version__}">',
render_update_notification(dict(request=request)),
render_update_notification({"request": request}),
)

0 comments on commit 443f67b

Please sign in to comment.