2 from org.maemo.hermes.engine.syncjob import SyncJob
10 self.contacts_preprocessed = []
11 self.contacts_processed = []
14 def pre_process_contact(self, contact):
15 self.contacts_preprocessed.append(contact)
16 def process_friends(self):
18 def process_contact(self, contact):
19 self.contacts_processed.append(contact)
22 class TestSyncJob(unittest.TestCase):
25 self.service = FakeService()
26 self.services = [self.service]
27 self.contact = FakeContact()
28 self.contacts = [self.contact]
29 self.testee = SyncJob(self.services, self.contacts)
31 def test_main_flow(self):
33 assert self.contact in self.service.contacts_preprocessed
34 assert self.contact in self.service.contacts_processed
36 if __name__ == '__main__':