diff --git a/tests.py b/tests.py index 9b4b094..fd250fc 100644 --- a/tests.py +++ b/tests.py @@ -1,4 +1,4 @@ -import codecs +import gzip import ujson as json import unittest from wanikaniburned import app, db, User, datetime_format, parse_range @@ -97,8 +97,8 @@ class TestFormats(unittest.TestCase): class TestUserItems(BaseTestCase): - with codecs.open('testuserdata.json', encoding='utf-8') as input_file: - user_data = json.load(input_file) + with gzip.open("testuserdata.json.gz", "rb") as input_file: + user_data = json.loads(input_file.read().decode('utf8')) user_radicals = user_data['radicals'] user_kanji = user_data['kanji'] user_vocabulary = user_data['vocabulary'] diff --git a/testuserdata.json.gz b/testuserdata.json.gz new file mode 100644 index 0000000..517d30a Binary files /dev/null and b/testuserdata.json.gz differ