scm ts should be ms too, fix unit tests

This commit is contained in:
Damien Elmes 2011-12-04 17:52:01 +09:00
parent 3b0334b04d
commit cca3b5cba6
3 changed files with 5 additions and 4 deletions

View file

@ -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."

View file

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

View file

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