From 8ea082ce604c9517bc999fc9af2a26e5eff19f7e Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 7 Jul 2018 14:09:28 +0200 Subject: Fixes #274 - Fix Databook.load() params ordering --- test_tablib.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test_tablib.py') diff --git a/test_tablib.py b/test_tablib.py index 9cbc6c8..758ac91 100755 --- a/test_tablib.py +++ b/test_tablib.py @@ -806,6 +806,9 @@ class JSONTests(BaseTestCase): book.json = _json self.assertEqual(json.loads(_json), json.loads(book.json)) + # Same with the load interface + book2 = tablib.Databook().load(_json, None) + self.assertEqual(json.loads(book.json), json.loads(book2.json)) def test_json_import_set(self): """Generate and import JSON set serialization.""" @@ -862,6 +865,9 @@ class YAMLTests(BaseTestCase): book.yaml = _yaml self.assertEqual(_yaml, book.yaml) + # Same with the load interface + book2 = tablib.Databook().load(_yaml, None) + self.assertEqual(_yaml, book2.yaml) def test_yaml_import_set(self): """Generate and import YAML set serialization.""" -- cgit v1.2.1