Skip to content

Commit 954a2ab

Browse files
committed
Added test case to check form is being used by admin
1 parent 98c2255 commit 954a2ab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_admin.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from djangocms_snippet import admin as snippet_admin
99
from djangocms_snippet import cms_config
10+
from djangocms_snippet.forms import SnippetForm
1011
from djangocms_snippet.models import Snippet
1112

1213
from .utils.factories import SnippetWithVersionFactory
@@ -51,3 +52,10 @@ def test_admin_list_display_with_versioning(self):
5152
)
5253
self.assertEqual(list_display[-1].short_description, 'actions')
5354
self.assertIn("function ExtendedVersionAdminMixin._list_actions", list_display[-1].__str__())
55+
56+
def test_admin_uses_form(self):
57+
"""
58+
The SnippetForm provides functionality to make SnippetGroupers irrelevant to the user,
59+
ensure the admin uses this.
60+
"""
61+
self.assertEqual(self.snippet_admin.form, SnippetForm)

0 commit comments

Comments
 (0)