mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
scm ts should be ms too, fix unit tests
This commit is contained in:
parent
3b0334b04d
commit
cca3b5cba6
3 changed files with 5 additions and 4 deletions
|
@ -160,7 +160,7 @@ crt=?, mod=?, scm=?, dty=?, usn=?, ls=?, conf=?""",
|
|||
if not self.schemaChanged():
|
||||
if check and not runFilter("modSchema", True):
|
||||
raise AnkiError("abortSchemaMod")
|
||||
self.scm = intTime()
|
||||
self.scm = intTime(1000)
|
||||
|
||||
def schemaChanged(self):
|
||||
"True if schema changed since last sync."
|
||||
|
|
|
@ -22,15 +22,15 @@ def test_findCards():
|
|||
f['Back'] = u'sheep'
|
||||
deck.addNote(f)
|
||||
catCard = f.cards()[0]
|
||||
f = deck.newNote()
|
||||
f['Front'] = u'template test'
|
||||
f['Back'] = u'foo bar'
|
||||
m = deck.models.current(); mm = deck.models
|
||||
t = mm.newTemplate("Reverse")
|
||||
t['qfmt'] = "{{Back}}"
|
||||
t['afmt'] = "{{Front}}"
|
||||
mm.addTemplate(m, t)
|
||||
mm.save(m)
|
||||
f = deck.newNote()
|
||||
f['Front'] = u'template test'
|
||||
f['Back'] = u'foo bar'
|
||||
deck.addNote(f)
|
||||
latestCardIds = [c.id for c in f.cards()]
|
||||
# tag searches
|
||||
|
|
|
@ -87,6 +87,7 @@ def test_remoteSync():
|
|||
# should report no changes
|
||||
assert ts.client.sync() == "noChanges"
|
||||
# bump local col
|
||||
ts.client.col.setMod()
|
||||
ts.client.col.save()
|
||||
assert ts.client.sync() == "success"
|
||||
# again, no changes
|
||||
|
|
Loading…
Reference in a new issue