From 6a073635ac9a6dd6b04e5a94bff1c6db78fdc400 Mon Sep 17 00:00:00 2001 From: flan Date: Mon, 10 Dec 2018 20:17:53 +0100 Subject: [PATCH] Update unit tests --- tests/test_sync_app.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_sync_app.py b/tests/test_sync_app.py index bcb5e8d..1e65e38 100644 --- a/tests/test_sync_app.py +++ b/tests/test_sync_app.py @@ -4,11 +4,12 @@ import sqlite3 import tempfile import unittest +from anki.consts import SYNC_VER + from ankisyncd.sync_app import SyncCollectionHandler from ankisyncd.sync_app import SyncUserSession from ankisyncd.sync_app import SimpleSessionManager from ankisyncd.sync_app import SqliteSessionManager -from ankisyncd.sync_app import old_client from collection_test_base import CollectionTestBase @@ -46,15 +47,15 @@ class SyncCollectionHandlerTest(CollectionTestBase): ) for cv in old: - if not old_client(cv): + if not SyncCollectionHandler._old_client(cv): raise AssertionError("old_client(\"%s\") is False" % cv) for cv in current: - if old_client(cv): + if SyncCollectionHandler._old_client(cv): raise AssertionError("old_client(\"%s\") is True" % cv) def test_meta(self): - meta = self.syncCollectionHandler.meta() + meta = self.syncCollectionHandler.meta(v=SYNC_VER) self.assertEqual(meta['scm'], self.collection.scm) self.assertTrue((type(meta['ts']) == int) and meta['ts'] > 0) self.assertEqual(meta['mod'], self.collection.mod)