summaryrefslogtreecommitdiff
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2012-08-16 17:29:59 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2012-08-16 22:38:42 +0200
commitc34d01278bd9cadff3f1ebea4579ef556cf75480 (patch)
tree730d40aed20ad27e665329cd34694a7cdc5861d2 /tests/test_utils.py
parentbab73174ff9c6c8ef4bfa24142d18f04411cb342 (diff)
downloadfactory-boy-c34d01278bd9cadff3f1ebea4579ef556cf75480.tar
factory-boy-c34d01278bd9cadff3f1ebea4579ef556cf75480.tar.gz
Add full tests for CircularSubFactory.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index dbc357b..9aaafc1 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -25,6 +25,7 @@ from factory import utils
from .compat import unittest
+
class ExtractDictTestCase(unittest.TestCase):
def test_empty_dict(self):
self.assertEqual({}, utils.extract_dict('foo', {}))
@@ -84,6 +85,7 @@ class ExtractDictTestCase(unittest.TestCase):
self.assertIn('foo__bar', d)
self.assertNotIn('foo__foo__bar', d)
+
class MultiExtractDictTestCase(unittest.TestCase):
def test_empty_dict(self):
self.assertEqual({'foo': {}}, utils.multi_extract_dict(['foo'], {}))
@@ -213,6 +215,7 @@ class MultiExtractDictTestCase(unittest.TestCase):
self.assertNotIn('bar__foo', d)
self.assertNotIn('bar__bar__baz', d)
+
class ImportObjectTestCase(unittest.TestCase):
def test_datetime(self):
imported = utils.import_object('datetime', 'date')