Objects should be nested to display the relationships that cause them to be scheduled for deletion.
(self)
| 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 | """ |