1 from org.maemo.hermes.engine.twitter.service import Service
2 from org.maemo.hermes.engine.names import canonical
6 class IntegrationTestTwitterService(unittest.TestCase):
7 """Tests that needs human interaction (such as for authorization)"""
10 self.api = twitter.Api(username="maemohermes", password="Eha8ohr7Cu")
11 self.testee = Service('twitter', self.api)
14 def test_main_flow(self):
15 self._exercise_service([])
17 assert len(self.testee.get_unmatched_friends()) > 0
18 assert len(self.testee.get_contacts_with_match()) == 0
21 def _exercise_service(self, contacts):
22 for contact in contacts:
23 self.testee.pre_process_contact(contact)
24 self.testee.process_friends()
25 for contact in contacts:
26 self.testee.process_contact(contact)
28 if __name__ == '__main__':