summaryrefslogtreecommitdiff
path: root/tests/test_using.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_using.py')
-rw-r--r--tests/test_using.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_using.py b/tests/test_using.py
index 7f9f09c..36ecdff 100644
--- a/tests/test_using.py
+++ b/tests/test_using.py
@@ -211,6 +211,17 @@ class FactoryTestCase(unittest.TestCase):
test_object = TestObjectFactory.build()
self.assertEqual(test_object.one, 'one')
+ def test_abstract(self):
+ class SomeAbstractFactory(factory.Factory):
+ ABSTRACT_FACTORY = True
+ one = 'one'
+
+ class InheritedFactory(SomeAbstractFactory):
+ FACTORY_FOR = TestObject
+
+ test_object = InheritedFactory.build()
+ self.assertEqual(test_object.one, 'one')
+
def testSequence(self):
class TestObjectFactory(factory.Factory):
one = factory.Sequence(lambda n: 'one' + n)