# -----------------------------------------------------------------------
def _register_match(self, contact, friend):
+ friend.set_contact(contact)
self._friends_without_contact.discard(friend)
self._friends_by_contact[contact] = friend
self._contacts_by_friend[friend] = contact
+
# -----------------------------------------------------------------------
def _get_friends_data(self):
"""Returns a list of dicts, where each dict represents a friend/contact"""
assert len(friends) == 2
assert len(contacts) == 2
assert self.other_contact in contacts
+ assert self.other_contact == contacts[self.other_contact].get_contact()
assert self.existing_contact in contacts
+ assert self.existing_contact == contacts[self.existing_contact].get_contact()
assert self.none_contact not in contacts
matchers = self.testee.get_contacts_with_match().keys()
assert len(matchers) == 1
assert matchers[0].id == 1
-
+
+
def test_name_collision_avoided_only_one_person_matched(self):
contact_do_match = FakeContact("Same Name", ["http://twitter.com/same_name"]);
contact_no_match = FakeContact("Same Name", [None])