From c60c3106c700f5f42ad4fcf82f327da98ec5eb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Thu, 12 Jan 2012 23:21:38 +0100 Subject: Add __repr__ / __str__ to a couple of objects. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaƫl Barrois --- tests/test_base.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test_base.py') diff --git a/tests/test_base.py b/tests/test_base.py index 97749f6..4f77421 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -56,6 +56,13 @@ class SafetyTestCase(unittest.TestCase): class FactoryTestCase(unittest.TestCase): + def testDisplay(self): + class TestObjectFactory(base.Factory): + FACTORY_FOR = FakeDjangoModel + + self.assertIn('TestObjectFactory', str(TestObjectFactory)) + self.assertIn('FakeDjangoModel', str(TestObjectFactory)) + def testLazyAttributeNonExistentParam(self): class TestObjectFactory(base.Factory): one = declarations.LazyAttribute(lambda a: a.does_not_exist ) -- cgit v1.2.3