aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_base.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_base.py b/tests/test_base.py
index 63fc62b..64570cd 100644
--- a/tests/test_base.py
+++ b/tests/test_base.py
@@ -64,6 +64,14 @@ class SafetyTestCase(unittest.TestCase):
class FactoryTestCase(unittest.TestCase):
+ def test_factory_for(self):
+ class TestObjectFactory(base.Factory):
+ FACTORY_FOR = TestObject
+
+ self.assertEqual(TestObject, TestObjectFactory.FACTORY_FOR)
+ obj = TestObjectFactory.build()
+ self.assertFalse(hasattr(obj, 'FACTORY_FOR'))
+
def testDisplay(self):
class TestObjectFactory(base.Factory):
FACTORY_FOR = FakeDjangoModel