mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
fixed sync unit test
This commit is contained in:
parent
75da977026
commit
c4c9847028
1 changed files with 1 additions and 3 deletions
|
@ -229,7 +229,7 @@ def test_localsync_media():
|
||||||
shutil.rmtree(tmpdir)
|
shutil.rmtree(tmpdir)
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
shutil.copytree(os.path.join(os.getcwd(),
|
shutil.copytree(os.path.join(os.path.dirname(__file__), "..",
|
||||||
"tests/syncing/media-tests"),
|
"tests/syncing/media-tests"),
|
||||||
tmpdir)
|
tmpdir)
|
||||||
deck1anki = os.path.join(tmpdir, "1.anki")
|
deck1anki = os.path.join(tmpdir, "1.anki")
|
||||||
|
@ -252,8 +252,6 @@ def test_localsync_media():
|
||||||
assert len(os.listdir(deck2media)) == 3
|
assert len(os.listdir(deck2media)) == 3
|
||||||
# check delete
|
# check delete
|
||||||
os.unlink(os.path.join(deck1media, "22161b29b0c18e068038021f54eee1ee.png"))
|
os.unlink(os.path.join(deck1media, "22161b29b0c18e068038021f54eee1ee.png"))
|
||||||
os.system("sync")
|
|
||||||
time.sleep(0.2)
|
|
||||||
rebuildMediaDir(deck1)
|
rebuildMediaDir(deck1)
|
||||||
client.sync()
|
client.sync()
|
||||||
assert deck1.s.scalar("select count(1) from media") == 2
|
assert deck1.s.scalar("select count(1) from media") == 2
|
||||||
|
|
Loading…
Reference in a new issue