diff options
author | Brian Waldon <bcwaldon@gmail.com> | 2012-06-07 13:27:46 -0700 |
---|---|---|
committer | Brian Waldon <bcwaldon@gmail.com> | 2012-06-07 13:27:46 -0700 |
commit | f25ce31640ec30429cd6408ee6e768e9788f9af3 (patch) | |
tree | c5df7d3d74ae7dd3b1edcd2b20727881df6ed464 /test | |
parent | d5a35f967616d527c17abe97dca4140da3b29951 (diff) | |
download | warlock-f25ce31640ec30429cd6408ee6e768e9788f9af3.tar.gz |
Cast schema name to string
Diffstat (limited to 'test')
-rw-r--r-- | test/test_core.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_core.py b/test/test_core.py index aa31198..3610619 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -19,6 +19,13 @@ class TestCore(unittest.TestCase): Country = warlock.model_factory(fixture) self.assertRaises(ValueError, Country, name=1) + def test_class_name_from_unicode_schema_name(self): + fixture_copy = copy.deepcopy(fixture) + fixture_copy['name'] = unicode(fixture_copy['name']) + # Can't set class.__name__ to a unicode object, ensure warlock + # does some magic to make it possible + warlock.model_factory(fixture_copy) + def test_invalid_operations(self): Country = warlock.model_factory(fixture) sweden = Country(name='Sweden', population=9379116) |