summaryrefslogtreecommitdiff
path: root/tests/test_using.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-03-11 22:36:30 +0100
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-03-11 22:36:30 +0100
commit60f0969406bd349a8a8b88fcaec819fa5c0525cb (patch)
tree6cf85cd478335d196d87bf4051986e007abc05a4 /tests/test_using.py
parent16e1a65f5b93615d946b74e3fb4d0b61c99ae0d2 (diff)
downloadfactory-boy-60f0969406bd349a8a8b88fcaec819fa5c0525cb.tar
factory-boy-60f0969406bd349a8a8b88fcaec819fa5c0525cb.tar.gz
Remove extract_prefix from post-generation hooks.
Magic abuse is bad.
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