From ebb5b8b3018c958033d1914d084a2ec0652fdb6d Mon Sep 17 00:00:00 2001 From: Andrew Flegg Date: Tue, 19 Oct 2010 22:04:35 +0100 Subject: [PATCH] Tidy up syncjob references --- package/src/org/maemo/hermes/engine/hermes.py | 7 +---- package/src/org/maemo/hermes/gui/gtkui.py | 1 - package/test/unit/test_syncjob.py | 37 ------------------------- 3 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 package/test/unit/test_syncjob.py diff --git a/package/src/org/maemo/hermes/engine/hermes.py b/package/src/org/maemo/hermes/engine/hermes.py index 7b50935..9d569d8 100644 --- a/package/src/org/maemo/hermes/engine/hermes.py +++ b/package/src/org/maemo/hermes/engine/hermes.py @@ -4,13 +4,8 @@ import evolution class Hermes: """Encapsulate the process of syncing online friends' information with the - Evolution contacts' database. This should be used as follows: + Evolution contacts' database. - * Initialise, passing in a GUI callback. - * Call Syncjob. - * Retrieve information on changes effected. - * Call update_contact to enact manual mapping. - Copyright (c) Andrew Flegg 2010. Released under the Artistic Licence.""" diff --git a/package/src/org/maemo/hermes/gui/gtkui.py b/package/src/org/maemo/hermes/gui/gtkui.py index 0f25f5d..45fdce7 100644 --- a/package/src/org/maemo/hermes/gui/gtkui.py +++ b/package/src/org/maemo/hermes/gui/gtkui.py @@ -12,7 +12,6 @@ from org.maemo.hermes.gui.contactview import ContactView from org.maemo.hermes.gui.mapcontact import MapContact from org.maemo.hermes.gui.accountsdialogue import AccountsDialogue from org.bleb.wimpworks import HildonMainScreenLayout -from org.maemo.hermes.engine.syncjob import SyncJob from org.maemo.hermes.engine.hermes import Hermes class HermesGUI(WimpWorks): diff --git a/package/test/unit/test_syncjob.py b/package/test/unit/test_syncjob.py deleted file mode 100644 index ebf7b5d..0000000 --- a/package/test/unit/test_syncjob.py +++ /dev/null @@ -1,37 +0,0 @@ -import unittest -from org.maemo.hermes.engine.syncjob import SyncJob - -class FakeContact(): - def __init__(self): - pass - -class FakeService(): - def __init__(self): - self.contacts_preprocessed = [] - self.contacts_processed = [] - def get_name(self): - return "fake service" - def pre_process_contact(self, contact): - self.contacts_preprocessed.append(contact) - def process_friends(self): - pass - def process_contact(self, contact): - self.contacts_processed.append(contact) - - -class TestSyncJob(unittest.TestCase): - - def setUp(self): - self.service = FakeService() - self.services = [self.service] - self.contact = FakeContact() - self.contacts = [self.contact] - self.testee = SyncJob(self.services, self.contacts) - - def test_main_flow(self): - self.testee.run() - assert self.contact in self.service.contacts_preprocessed - assert self.contact in self.service.contacts_processed - -if __name__ == '__main__': - unittest.main() -- 1.7.9.5