MCPcopy
hub / github.com/django/django / test_flatten_fieldsets

Method test_flatten_fieldsets

tests/admin_utils/tests.py:494–506  ·  view source on GitHub ↗

Regression test for #18051

(self)

Source from the content-addressed store, hash-verified

492 self.assertEqual(flatten(orig), expected)
493
494 def test_flatten_fieldsets(self):
495 """
496 Regression test for #18051
497 """
498 fieldsets = ((None, {"fields": ("url", "title", ("content", "sites"))}),)
499 self.assertEqual(
500 flatten_fieldsets(fieldsets), ["url", "title", "content", "sites"]
501 )
502
503 fieldsets = ((None, {"fields": ("url", "title", ["content", "sites"])}),)
504 self.assertEqual(
505 flatten_fieldsets(fieldsets), ["url", "title", "content", "sites"]
506 )
507
508 def test_quote(self):
509 self.assertEqual(quote("something\nor\nother"), "something_0Aor_0Aother")

Callers

nothing calls this directly

Calls 1

flatten_fieldsetsFunction · 0.90

Tested by

no test coverage detected