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.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/test_using.py b/tests/test_using.py
index b617668..a0b0db7 100644
--- a/tests/test_using.py
+++ b/tests/test_using.py
@@ -1218,25 +1218,6 @@ class PostGenerationTestCase(unittest.TestCase):
self.assertFalse(obj.create)
self.assertEqual({'incr_one': 42}, obj.results)
- @tools.disable_warnings
- def test_post_generation_calling(self):
- class TestObjectFactory(factory.Factory):
- FACTORY_FOR = TestObject
-
- one = 1
-
- @factory.post_generation()
- def incr_one(self, _create, _increment):
- self.one += 1
-
- obj = TestObjectFactory.build()
- self.assertEqual(2, obj.one)
- self.assertFalse(hasattr(obj, 'incr_one'))
-
- obj = TestObjectFactory.build(one=2)
- self.assertEqual(3, obj.one)
- self.assertFalse(hasattr(obj, 'incr_one'))
-
def test_post_generation_extraction(self):
class TestObjectFactory(factory.Factory):
FACTORY_FOR = TestObject