summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_using.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_using.py b/tests/test_using.py
index 5453b95..fb0e8b0 100644
--- a/tests/test_using.py
+++ b/tests/test_using.py
@@ -249,6 +249,16 @@ class UsingFactoryTestCase(unittest.TestCase):
test_object = TestObjectFactory.build()
self.assertEqual(test_object.one, 'one')
+ def test_inheritance(self):
+ @factory.use_strategy(factory.BUILD_STRATEGY)
+ class TestObjectFactory(factory.Factory, TestObject):
+ FACTORY_FOR = TestObject
+
+ one = 'one'
+
+ test_object = TestObjectFactory()
+ self.assertEqual(test_object.one, 'one')
+
def test_abstract(self):
class SomeAbstractFactory(factory.Factory):
FACTORY_ABSTRACT = True