ensure crt synced

This commit is contained in:
Damien Elmes 2012-07-18 11:19:30 +09:00
parent bd80f31c48
commit 779bcbef39
2 changed files with 9 additions and 0 deletions

View file

@ -149,6 +149,7 @@ Sanity check failed. Please copy and paste the text below:\n%s\n%s""" % (c, s))
tags=self.getTags())
if self.lnewer:
d['conf'] = self.getConf()
d['crt'] = self.col.crt
return d
def applyChanges(self, changes):
@ -165,6 +166,9 @@ Sanity check failed. Please copy and paste the text below:\n%s\n%s""" % (c, s))
self.mergeTags(rchg['tags'])
if 'conf' in rchg:
self.mergeConf(rchg['conf'])
# this was left out of earlier betas
if 'crt' in rchg:
self.col.crt = rchg['crt']
self.prepareToChunk()
def sanityCheck(self):

View file

@ -90,6 +90,11 @@ def test_sync():
deck1.save()
assert client.sync() == "success"
check(2)
# crt should be synced
deck1.crt = 123
deck1.setMod()
assert client.sync() == "success"
assert deck1.crt == deck2.crt
@nose.with_setup(setup_modified)
def test_models():