--- /dev/null
+from org.maemo.hermes.engine.twitter.service import Service
+from org.maemo.hermes.engine.names import canonical
+import unittest
+import twitter
+
+class TestTwitterService(unittest.TestCase):
+ """Tests that needs human interaction (such as for authorization)"""
+
+ def setUp(self):
+ self.api = twitter.Api(username="maemohermes", password="Eha8ohr7Cu")
+ self.testee = Service(self.api)
+
+
+ def test_main_flow(self):
+ self._exercise_service([])
+
+ assert len(self.testee.get_unmatched_friends()) > 0
+ assert len(self.testee.get_contacts_with_match()) == 0
+
+
+ def _exercise_service(self, contacts):
+ for contact in contacts:
+ self.testee.pre_process_contact(contact)
+ self.testee.process_friends()
+ for contact in contacts:
+ self.testee.process_contact(contact)
+
+if __name__ == '__main__':
+ unittest.main()