diff options
author | Brian Waldon <bcwaldon@gmail.com> | 2012-07-27 12:45:24 -0700 |
---|---|---|
committer | Brian Waldon <bcwaldon@gmail.com> | 2012-07-27 12:45:40 -0700 |
commit | f2b38319ba986c566dc9aaaf74747facfe1a1b0c (patch) | |
tree | fdbd064d738efcf1052252b110a26cf00c109394 /test | |
parent | 2c24556370b82dac6f97d316ec75931a74987b86 (diff) | |
download | warlock-f2b38319ba986c566dc9aaaf74747facfe1a1b0c.tar.gz |
Add items method to model
This is similar to the iteritems method in implementation - it exposes
the 'items' method of the internal dictionary.
Bump version to v0.3.0
Diffstat (limited to 'test')
-rw-r--r-- | test/test_core.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_core.py b/test/test_core.py index 761da16..3502712 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -55,11 +55,13 @@ class TestCore(unittest.TestCase): exc = warlock.InvalidOperation self.assertRaises(exc, setattr, sweden, 'abbreviation', 0) - def test_iteritems(self): + def test_items(self): Country = warlock.model_factory(fixture) sweden = Country(name='Sweden', population=9379116) self.assertEqual(set(list(sweden.iteritems())), set([('name', 'Sweden'), ('population', 9379116)])) + self.assertEqual(set(sweden.items()), + set([('name', 'Sweden'), ('population', 9379116)])) def test_dict_syntax(self): Country = warlock.model_factory(fixture) |