Add support for creating contacts from "interesting" friends on LinkedIn. Completes...
[hermes] / package / test / unit / test_friend.py
index 5e950ab..731f119 100644 (file)
@@ -49,7 +49,22 @@ class TestFriend(unittest.TestCase):
         friend.update_contact(contact, False)
         assert 'http://chitter.com/bob.smith' in contact.get_urls()
         assert 'http://www.friendface.com/bob.smith' in contact.get_urls()
+        
+        
+    def test_interesting_friends(self):
+        friend = Friend(name = 'Bob Smith', source = 'test')
+        assert not friend.is_interesting()
+        
+        friend.add_url('http://chitter.com/bob.smith')
+        assert not friend.is_interesting()
+        
+        friend.add_phone(PhoneNumber("01234 567890"))
+        assert friend.is_interesting()
 
+        friend = Friend(name = 'Bob Smith', source = 'test')
+        friend.set_birthday_date("01/01/2010")
+        assert friend.is_interesting()
+        
     
 if __name__ == '__main__':
     unittest.main()