diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-01-12 23:21:38 +0100 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-01-12 23:21:38 +0100 |
commit | c60c3106c700f5f42ad4fcf82f327da98ec5eb9e (patch) | |
tree | 570302046f68591b05a7178152c610917c71fe45 /tests/test_base.py | |
parent | 0c4b9334c93170ce6df17506f48e3937090aec05 (diff) | |
download | factory-boy-c60c3106c700f5f42ad4fcf82f327da98ec5eb9e.tar factory-boy-c60c3106c700f5f42ad4fcf82f327da98ec5eb9e.tar.gz |
Add __repr__ / __str__ to a couple of objects.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Diffstat (limited to 'tests/test_base.py')
-rw-r--r-- | tests/test_base.py | 7 |
1 files changed, 7 insertions, 0 deletions
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 ) |