1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

[1.1.X] Fixed #12506 - 'lazy' fails when there are multiple expected classes with the same method

Thanks to Alex for report and patch

Backport of r12104 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12105 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant
2010-01-05 13:20:19 +00:00
parent d4f9bff7ef
commit 3de16688a9
3 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
from unittest import TestCase
from django.utils.functional import lazy
class FunctionalTestCase(TestCase):
def test_lazy(self):
t = lazy(lambda: tuple(range(3)), list, tuple)
for a, b in zip(t(), range(3)):
self.assertEqual(a, b)