Commit 78b6bb2b authored by Nicolas Delaby's avatar Nicolas Delaby

update One way test (use alert code explicitely)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15501 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 48b3a1ba
...@@ -1333,12 +1333,14 @@ class TestERP5SyncML(TestERP5SyncMLMixin, ERP5TypeTestCase): ...@@ -1333,12 +1333,14 @@ class TestERP5SyncML(TestERP5SyncMLMixin, ERP5TypeTestCase):
source_uri='Person', source_uri='Person',
target_uri='Person', target_uri='Person',
query='objectValues', query='objectValues',
xml_mapping='', xml_mapping=self.xml_mapping,
conduit='ERP5Conduit', conduit='ERP5Conduit',
gpg_key='', gpg_key='',
gid_generator='getId', gid_generator='getId',
activity_enabled=False) activity_enabled=False,
alert_code = SyncCode.ONE_WAY_FROM_SERVER)
sub = portal_sync.getSubscription(self.sub_id1) sub = portal_sync.getSubscription(self.sub_id1)
self.assertTrue(sub.isOneWayFromServer())
self.failUnless(sub is not None) self.failUnless(sub is not None)
def test_33_OneWaySync(self, quiet=0, run=run_all_test): def test_33_OneWaySync(self, quiet=0, run=run_all_test):
...@@ -1357,11 +1359,11 @@ class TestERP5SyncML(TestERP5SyncMLMixin, ERP5TypeTestCase): ...@@ -1357,11 +1359,11 @@ class TestERP5SyncML(TestERP5SyncMLMixin, ERP5TypeTestCase):
nb_person = self.populatePersonServer(quiet=1,run=1) nb_person = self.populatePersonServer(quiet=1,run=1)
portal_sync = self.getSynchronizationTool() portal_sync = self.getSynchronizationTool()
for sub in portal_sync.getSubscriptionList(): for sub in portal_sync.getSubscriptionList():
self.assertEquals(sub.getSynchronizationType(),SyncCode.SLOW_SYNC) self.assertEquals(sub.getSynchronizationType(), SyncCode.SLOW_SYNC)
# First do the sync from the server to the client # First do the sync from the server to the client
nb_message1 = self.synchronize(self.sub_id1) nb_message1 = self.synchronize(self.sub_id1)
for sub in portal_sync.getSubscriptionList(): for sub in portal_sync.getSubscriptionList():
self.assertEquals(sub.getSynchronizationType(),SyncCode.TWO_WAY) self.assertEquals(sub.getSynchronizationType(), SyncCode.ONE_WAY_FROM_SERVER)
self.assertEquals(nb_message1,self.nb_message_first_synchronization) self.assertEquals(nb_message1,self.nb_message_first_synchronization)
subscription1 = portal_sync.getSubscription(self.sub_id1) subscription1 = portal_sync.getSubscription(self.sub_id1)
self.assertEquals(len(subscription1.getObjectList()),nb_person) self.assertEquals(len(subscription1.getObjectList()),nb_person)
...@@ -1384,7 +1386,6 @@ class TestERP5SyncML(TestERP5SyncMLMixin, ERP5TypeTestCase): ...@@ -1384,7 +1386,6 @@ class TestERP5SyncML(TestERP5SyncMLMixin, ERP5TypeTestCase):
self.assertEquals(person1_c.getLastName(),self.last_name2) self.assertEquals(person1_c.getLastName(),self.last_name2)
self.assertEquals(person1_s.getFirstName(),self.first_name1) self.assertEquals(person1_s.getFirstName(),self.first_name1)
def test_34_encoding(self, quiet=0, run=run_all_test): def test_34_encoding(self, quiet=0, run=run_all_test):
""" """
We will test if we can encode strings with b64encode to encode We will test if we can encode strings with b64encode to encode
......
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