1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

[1.7.x] Fixed #24352 -- Fixed crash when coercing `ManyRelatedManager` to a string.

This commit is contained in:
Gabriel Muñumel
2015-02-26 08:50:53 +00:00
committed by Tim Graham
parent aa6853da22
commit 0831a43c3a
3 changed files with 9 additions and 1 deletions

View File

@@ -109,3 +109,7 @@ class M2MRegressionTests(TestCase):
worksheet.lines = hi
self.assertEqual(1, worksheet.lines.count())
self.assertEqual(1, hi.count())
def test_many_related_manager_str(self):
worksheet = Worksheet.objects.create(id=1)
self.assertIn('ManyRelatedManager', str(worksheet.lines))