MCPcopy
hub / github.com/django/django / test_nesting

Method test_nesting

tests/admin_views/tests.py:3994–4010  ·  view source on GitHub ↗

Objects should be nested to display the relationships that cause them to be scheduled for deletion.

(self)

Source from the content-addressed store, hash-verified

3992 self.client.force_login(self.superuser)
3993
3994 def test_nesting(self):
3995 """
3996 Objects should be nested to display the relationships that
3997 cause them to be scheduled for deletion.
3998 """
3999 pattern = re.compile(
4000 r'<li>Plot: <a href="%s">World Domination</a>\s*<ul>\s*'
4001 r'<li>Plot details: <a href="%s">almost finished</a>'
4002 % (
4003 reverse("admin:admin_views_plot_change", args=(self.pl1.pk,)),
4004 reverse("admin:admin_views_plotdetails_change", args=(self.pd1.pk,)),
4005 )
4006 )
4007 response = self.client.get(
4008 reverse("admin:admin_views_villain_delete", args=(self.v1.pk,))
4009 )
4010 self.assertRegex(response.text, pattern)
4011
4012 def test_cyclic(self):
4013 """

Callers

nothing calls this directly

Calls 3

reverseFunction · 0.90
compileMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected