Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Hermes
Summary Lists News SCM
authorFredrik Wendt <fredrik@wendt.se>
Wed, 9 Jun 2010 22:20:19 +0000 (23:20 +0100)
committerFredrik Wendt <fredrik@wendt.se>
Wed, 9 Jun 2010 22:20:19 +0000 (23:20 +0100)
Signed-off-by: Fredrik Wendt <fredrik@wendt.se>

package/test/unit/test_hermes.py

index 2ccaaf8..3cd73e5 100644 (file)
@@ -63,6 +63,10 @@ class FakeContact(Friend):
         return None
     def get_emails(self):
         return []
+    def set_photo(self, value):
+        self.set_photo_url(value)
+    def get_birthday(self):
+        return self.get_birthday_date()
 
 class FakeEContact():
     def __init__(self, name):
@@ -118,7 +122,7 @@ class TestHermes(unittest.TestCase):
         assert len(self.hermes.updated) == 0
         
         
-    def test_one_contact_and_one_match(self):
+    def test_one_contact_and_one_match_and_no_field_updated(self):
         contact = FakeEContact("Fredrik")
         friend = Friend("Fredrik", props={'birthday_date':'1980-10-15'})
         self.abook.contacts.append(contact)
@@ -131,7 +135,7 @@ class TestHermes(unittest.TestCase):
         assert len(self.service.contacts_pre_processed) == 1
         assert len(self.hermes.unmatched) == 0
         assert len(self.hermes.matched) == 1
-        assert len(self.hermes.updated) == 1
+        assert len(self.hermes.updated) == 0
         
         
     # faked to avoid evolution/ebook dependency

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment