Ejemplo n.º 1
0
 def createContacts(self):
     self.contact1 = Contact(given_name="My",
                             family_name="Name",
                             phone="(12345) 678910",
                             email="[email protected]",
                             address_line_1="123 A Road Name, Somewhere",
                             role="Head of Surgery",
                             tags="Hospital, Medicine, Surgeon",
                             organization="London Teaching Hospital",
                             note="Note Very Important")
     self.contact1.save()
     self.contact2 = Contact(
         given_name="Anew",
         family_name="Person",
         phone="(54321) 123456",
         email="[email protected]",
         address_line_1="456 A Road, Through the Looking Glass",
         role="Pharmacist",
         tags="Medicine",
         organization="Selby's Pharmacy")
     self.contact2.save()
     self.contact3 = Contact(given_name="Aptivate",
                             family_name="Employee",
                             phone="(32543) 523566",
                             email="[email protected]",
                             address_line_1="999 Letsbe Avenue",
                             tags="academia",
                             note="Death Note",
                             role="Researcher",
                             organization="Imperial College")
     self.contact3.save()
Ejemplo n.º 2
0
 def test_batch_update_does_not_change_contact_with_no_linked_in_profile(self):
     joyce = Contact(given_name="Joyce", family_name="Kgatlwane")
     joyce.save()
     
     response = self.do_batch_update_and_return_response()
     
     matches = Contact.objects.filter(given_name="Joyce")
     self.assertEquals(1, len(matches))
     
     batch_report = response.context['batch_report']
     self.assertEquals([{"Joyce Kgatlwane" : "No LinkedIn Profile"}],
                       batch_report)