Added sample user data for use in tests.

This commit is contained in:
neviyn 2016-01-25 22:17:52 +00:00
parent fbfd4932e6
commit 92347da966
2 changed files with 3 additions and 3 deletions

View File

@ -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']

BIN
testuserdata.json.gz Normal file

Binary file not shown.