Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Hermes
Summary Lists News SCM
index 2b3e958..08e4c86 100644 (file)
@@ -34,11 +34,14 @@ class FakeOAuth():
             return '{"id":"1234567","name":"Maemo Hermes"}'
         
         elif url == 'https://graph.facebook.com/me/friends':
-            return '{"data":[{"id":"1","name":"J Smith","website":"http:\/\/www.example.org"},{"id":"2","name":"P Barnum"}]}'
+            return '{"data":[{"id":"1","name":"J Smith","website":"http:\/\/www.example.org"},{"id":"2","name":"P Barnum","picture":"http://fbcn.example.com/32939012.jpg"}]}'
         
         else:
             raise Exception("Unknown URL: %s" % (url))
         
+    def get_access_token(self):
+        return 'XXX'
+        
 
 class TestFacebookService(unittest.TestCase):
     
@@ -191,6 +194,7 @@ class TestFacebookAPI(unittest.TestCase):
         assert len(friends) == 2
         assert friends[0]['name'] == 'J Smith'
         assert friends[1]['id'] == '2'
+        assert friends[1]['picture'] == 'https://graph.facebook.com/2/picture?type=large&access_token=XXX'
 
     
 if __name__ == '__main__':

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment