diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-01-12 13:30:41 -0800 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-01-12 13:30:41 -0800 |
commit | 74225f59761ed3e09b625d9886552bdafb0fc30d (patch) | |
tree | 03c9204a5425f5ec3413f69ea09d1ad835b12ac1 /tests/test_containers.py | |
parent | 363fa7b470286f2b38ab33a7e986bfd000f25d86 (diff) | |
parent | 5bdc19ccbde3934a05b11a0d0edf50d3b31e930d (diff) | |
download | factory-boy-74225f59761ed3e09b625d9886552bdafb0fc30d.tar factory-boy-74225f59761ed3e09b625d9886552bdafb0fc30d.tar.gz |
Merge pull request #4 from carljm/allow-public-classmethods
Allow public classmethods/staticmethods on factories.
Diffstat (limited to 'tests/test_containers.py')
-rw-r--r-- | tests/test_containers.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_containers.py b/tests/test_containers.py index 57c06cf..effb060 100644 --- a/tests/test_containers.py +++ b/tests/test_containers.py @@ -159,7 +159,13 @@ class DeclarationDictTestCase(unittest.TestCase): def test_update_with_public(self): d = containers.DeclarationDict() - d.update_with_public({'one': 1, '_two': 2, 'three': 3}) + d.update_with_public({ + 'one': 1, + '_two': 2, + 'three': 3, + 'classmethod': classmethod(lambda c: 1), + 'staticmethod': staticmethod(lambda: 1), + }) self.assertEqual(set(['one', 'three']), set(d)) self.assertEqual(set([1, 3]), set(d.values())) |