diff --git a/tests/admin_views/models.py b/tests/admin_views/models.py
index 8828c8b..4d500cd 100644
a
|
b
|
class CyclicTwo(models.Model):
|
596 | 596 | return self.name |
597 | 597 | |
598 | 598 | |
| 599 | @python_2_unicode_compatible |
599 | 600 | class Topping(models.Model): |
600 | 601 | name = models.CharField(max_length=20) |
601 | 602 | |
| 603 | def __str__(self): |
| 604 | return self.name |
| 605 | |
602 | 606 | |
603 | 607 | class Pizza(models.Model): |
604 | 608 | name = models.CharField(max_length=20) |
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 3368ddf..a9d4d0d 100644
a
|
b
|
class ReadonlyTest(AdminFieldExtractionMixin, TestCase):
|
4696 | 4696 | response = self.client.get(reverse('admin:admin_views_topping_add')) |
4697 | 4697 | self.assertEqual(response.status_code, 200) |
4698 | 4698 | |
| 4699 | def test_readonly_manytomany_forwards_ref(self): |
| 4700 | topping = Topping.objects.create(name='Salami') |
| 4701 | pizza = Pizza.objects.create(name='Americano') |
| 4702 | pizza.toppings.add(topping) |
| 4703 | response = self.client.get(reverse('admin:admin_views_pizza_change', args=(pizza.pk,))) |
| 4704 | self.assertContains(response,'<label>Toppings:</label>') |
| 4705 | self.assertContains(response, '<p>Salami</p>', html=True) |
| 4706 | |
4699 | 4707 | def test_readonly_onetoone_backwards_ref(self): |
4700 | 4708 | """ |
4701 | 4709 | Can reference a reverse OneToOneField in ModelAdmin.readonly_fields. |