Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Hermes
Summary Lists News SCM
0872abb637b799b27a2a8b5607a65eaa576b0d25
1 from org.maemo.hermes.engine.twitter.service import Service
2 from org.maemo.hermes.engine.names import canonical
3 import unittest
4 import twitter
6 class IntegrationTestTwitterService(unittest.TestCase):
7     """Tests that needs human interaction (such as for authorization)"""
8     
9     def setUp(self):
10         self.api = twitter.Api(username="maemohermes", password="Eha8ohr7Cu")
11         self.testee = Service('twitter', self.api)
12     
13     
14     def test_main_flow(self):
15         self._exercise_service([])
16         
17         assert len(self.testee.get_unmatched_friends()) > 0
18         assert len(self.testee.get_contacts_with_match()) == 0
19         
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)
27     
28 if __name__ == '__main__':
29     unittest.main()

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment