[Erp5-report] r35835 nicolas - /erp5/trunk/products/ERP5SyncML/tests/testERP5DocumentSyncML.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon May 31 19:11:22 CEST 2010
Author: nicolas
Date: Mon May 31 19:11:21 2010
New Revision: 35835
URL: http://svn.erp5.org?rev=35835&view=rev
Log:
Conflict on base_data and data are now detected.
Update test
Modified:
erp5/trunk/products/ERP5SyncML/tests/testERP5DocumentSyncML.py
Modified: erp5/trunk/products/ERP5SyncML/tests/testERP5DocumentSyncML.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/tests/testERP5DocumentSyncML.py?rev=35835&r1=35834&r2=35835&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/tests/testERP5DocumentSyncML.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/tests/testERP5DocumentSyncML.py [utf8] Mon May 31 19:11:21 2010
@@ -910,10 +910,11 @@
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 @@
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()
More information about the Erp5-report
mailing list