summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_using.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_using.py b/tests/test_using.py
index e0e59cd..4256cc3 100644
--- a/tests/test_using.py
+++ b/tests/test_using.py
@@ -280,6 +280,14 @@ class FactoryTestCase(unittest.TestCase):
test_object = TestModelFactory.create()
self.assertEqual(test_object, "This doesn't even return an instance of TestModel")
+ def testClassMethodAccessible(self):
+ class TestObjectFactory(factory.Factory):
+ @classmethod
+ def alt_create(cls, **kwargs):
+ return kwargs
+
+ self.assertEqual(TestObjectFactory.alt_create(foo=1), {"foo": 1})
+
class SubFactoryTestCase(unittest.TestCase):
def testSubFactory(self):