Commit 6ae4377a authored by Nicolas Delaby's avatar Nicolas Delaby

Conflict on base_data and data are now detected.

Update test


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35835 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3c271ebd
......@@ -910,10 +910,11 @@ class TestERP5DocumentSyncML(TestERP5DocumentSyncMLMixin):
self.tic()
self.synchronize(self.sub_id1)
conflict_list = portal_sync.getConflictList()
self.assertEqual(len(conflict_list), 7)
self.assertEqual(len(conflict_list), 9)
self.assertEqual(sorted([x.getKeyword() for x in conflict_list]),
['content_md5', 'content_type', 'description',
'short_title', 'size', 'source_reference', 'title'])
['base_data', 'content_md5', 'content_type',
'data', 'description', 'short_title', 'size',
'source_reference', 'title'])
# check if we have the state conflict on all clients
self.checkSynchronizationStateIsConflict()
# we will take :
......@@ -922,16 +923,16 @@ class TestERP5DocumentSyncML(TestERP5DocumentSyncMLMixin):
for conflict in conflict_list :
subscriber = conflict.getSubscriber()
property = conflict.getPropertyId()
resolve = 0
resolved = False
if property == 'description':
if subscriber.getSubscriptionUrl()==self.publication_url:
resolve = 1
if subscriber.getSubscriptionUrl() == self.publication_url:
resolved = True
conflict.applySubscriberValue()
if property == 'short_title':
if subscriber.getSubscriptionUrl()==self.subscription_url['two_way']:
resolve = 1
if subscriber.getSubscriptionUrl() == self.subscription_url['two_way']:
resolved = True
conflict.applySubscriberValue()
if not resolve:
if not resolved:
conflict.applyPublisherValue()
self.synchronize(self.sub_id1)
self.checkSynchronizationStateIsSynchronized()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment