diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-04-15 02:22:01 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-04-15 02:22:01 +0200 |
commit | 2b661e6eae3187c05c4eb8e1c3790cee6a9e3032 (patch) | |
tree | fb23ae16274eb071639b64792dff07f1d1302898 /tests/test_base.py | |
parent | e7a9a87320c78ec05a5d548516fe17c258e6d4c7 (diff) | |
download | factory-boy-2b661e6eae3187c05c4eb8e1c3790cee6a9e3032.tar factory-boy-2b661e6eae3187c05c4eb8e1c3790cee6a9e3032.tar.gz |
Add Dict/List declarations (Closes #18).
Diffstat (limited to 'tests/test_base.py')
-rw-r--r-- | tests/test_base.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_base.py b/tests/test_base.py index 969ef13..73e59fa 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -63,6 +63,15 @@ class SafetyTestCase(unittest.TestCase): self.assertRaises(base.FactoryError, base.BaseFactory) +class AbstractFactoryTestCase(unittest.TestCase): + def test_factory_for_optional(self): + """Ensure that FACTORY_FOR is optional for ABSTRACT_FACTORY.""" + class TestObjectFactory(base.Factory): + ABSTRACT_FACTORY = True + + # Passed + + class FactoryTestCase(unittest.TestCase): def test_factory_for(self): class TestObjectFactory(base.Factory): @@ -106,6 +115,7 @@ class FactoryTestCase(unittest.TestCase): ones = set([x.one for x in (parent, alt_parent, sub, alt_sub)]) self.assertEqual(4, len(ones)) + class FactoryDefaultStrategyTestCase(unittest.TestCase): def setUp(self): self.default_strategy = base.Factory.FACTORY_STRATEGY |