Rename db.loadJson to db.updateJson

This commit is contained in:
shortcutme 2017-02-09 01:53:31 +01:00
parent 90c9adc8dc
commit 38d330da1a
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 6 additions and 6 deletions

View file

@ -59,7 +59,7 @@ class TestDb:
{"test_id": 1, "titlelike": "Test%"}
).fetchone()["num"] == 1
def testLoadJson(self, db):
def testUpdateJson(self, db):
f = StringIO.StringIO()
f.write("""
{
@ -69,6 +69,6 @@ class TestDb:
}
""")
f.seek(0)
assert db.loadJson(db.db_dir + "data.json", f) == True
assert db.updateJson(db.db_dir + "data.json", f) == True
assert db.execute("SELECT COUNT(*) AS num FROM test_importfilter").fetchone()["num"] == 1
assert db.execute("SELECT COUNT(*) AS num FROM test").fetchone()["num"] == 1