def copy_email(cls, number): """ A funct that copies the email using the pyperclip framework We import the framework then declare a function that copies the emails. """ contact_found = Contact.find_by_number(number) pyperclip.copy(contact_found.email)
def test_find_contact_by_number(self): self.new_contact.save_contact() test_contact = Contact("Test", "user", "0711223344", "*****@*****.**") # new contact test_contact.save_contact() found_contact = Contact.find_by_number("0711223344") self.assertEqual(found_contact.email, test_contact.email)
def test_find_contact_by_number(self): self.new_contact.save_contact() test_contact = Contact("Test","user","0728868073","*****@*****.**") test_contact.save_contact() found_contact = Contact.find_by_number("0728868073") self.assertEqual(found_contact.email,test-contact.email)
def test_find_contact_by_number(self): ''' test to check if we can find a contact by phone number and display information ''' self.new_contact.save_contact() test_contact = Contact("Test","user","0712345678","*****@*****.**") # new contact test_contact.save_contact() found_contact = Contact.find_by_number('0712345678') self.assertEqual(found_contact.email,test_contact.email)
def test_find_contact_by_number(self): # test to check if we can find a contact by phone number self.new_contact.save_contact() test_contact = Contact("Test", "user", "0712345678", "*****@*****.**") # new contact_list test_contact.save_contact() found_contact = Contact.find_by_number("0712345678") self.assertEqual(found_contact.email, test_contact.email)
def test_find_contact_by_number(self): ''' Test to check if we can find a contact by phone number and display information ''' self.new_contact.save_contact() test_contact = Contact("Test", "user", "0711223344", "*****@*****.**") # new contact test_contact.save_contact() found_contact = Contact.find_by_number("0711223344")
def test_find_contact_by_number(self): ''' test_find_contact_by_number test case to test if we can find a contact object by phone number. ''' self.new_contact.save_contact() Test_contact = Contact("Test","user","0712345678","*****@*****.**") Test_contact.save_contact() found_contact = Contact.find_by_number("0712345678") self.assertEqual(found_contact.email,Test_contact.email)
def test_find_contact_by_number(self): self.new_contact.save_contact() self.test_concat = Contact("Test", "user", "0711223344", "*****@*****.**") self.test_concat.save_contact() found_contact = Contact.find_by_number("0711223344") self.assertEqual(found_contact.phone_number, self.test_concat.phone_number)
def test_find_contact_by_number(self): """ test_find_contact_by_number() tests if we can find a contact by phone number and display information """ self.new_contact.save_contact() test_contact = Contact("Ednas","Nell","3806743158","*****@*****.**"); test_contact.save_contact() found_contact = Contact.find_by_number("3806743158") self.assertEqual(found_contact.email,test_contact.email)
def test_find_contact_by_number(self): ''' test_find_contact_by_number tests to check if we can find a contact by number and display the information ''' self.new_contact.save_contact() test_contact = Contact("Kijo", "Kimita", "0720327460", "*****@*****.**") test_contact.save_contact() found_contact = Contact.find_by_number("0720327460") self.assertEqual(found_contact.email, test_contact.email)
def test_find_contact_by_number(self): ''' test to check if we can find a contact by phone number and display information ''' self.new_contact.save_contact() test_contact = Contact('Test', 'user', '0711223344', '*****@*****.**') # new contact test_contact.save_contact() found_contact = Contact.find_by_number('0711223344') self.assertEqual(found_contact.email, test_contact.email)
def test_find_contact_by_number(self): ''' test to check if we can find a contact by phone number and display information ''' self.new_contact.save_contact() test_contact = Contact("Kepha", "user", "0707630747", "*****@*****.**") # new contact test_contact.save_contact() found_contact = Contact.find_by_number("0707630747") self.assertEqual(found_contact.email, test_contact.email)
def test_find_contact_by_number(self): ''' test to check if we can find a contact by phone number and display information ''' self.new_contact.save_contact() test_contact = Contact("Irene", "Adler", "98378973", "*****@*****.**") test_contact.save_contact() found_contact = Contact.find_by_number("98378973") self.assertEqual(found_contact.email, test_contact.email)
def test_find_by_number(self): """ Test to check if we can find a contact by phone nuber and display any information. """ self.new_contact.save_contact() # new contact test_contact = Contact("Test", "user", "0748363839", "*****@*****.**") test_contact.save_contact() # The number that we find in found_contact should be the same as the one in test_contact for the test to pass. # If they aren't the same...the test will always fail found_contact = Contact.find_by_number("0748363839") # The test self.assertEqual(found_contact.email, test_contact.email)
def find_contact(number): return Contact.find_by_number(number)
def check_existing_contacts(number): return Contact.find_by_number(number)
def find_contact(number): ''' function to find contact object based on phone number ''' return Contact.find_by_number(number)
def find_contact(number): """ function to find a number """ return Contact.find_by_number(number)
def findContact(number): Contact.find_by_number(number)
def check_existing_contacts(number): """ Functions that finds a contact by number and returns the contact """ return Contact.find_by_number(number)
def copy_email(cls, number): contact_found = Contact.find_by_number(number) pyperclip.copy(contact_found.email)
def find_contact(number): ''' function to find contact ''' return Contact.find_by_number(number)
def test_find_a_contact_by_number(self): contact1 = Contact("p1",123,"[email protected]").save() contact2 = Contact("p2",124,"[email protected]").save() contact = Contact.find_by_number(123) self.assertEqual(contact.name, contact1.name)
def find_contact(number): """ Function that finds a contact by number and returns the contract """ return Contact.find_by_number(number)
def test_find_by_number(self): test_contact = Contact("test", "user","700000000", "*****@*****.**") test_contact.save_contact() found_contact = Contact.find_by_number("700000000") self.assertEqual(found_contact.email,test_contact.email)
def find_contact(number): ''' Function that finds a contact by number and returns the contact ''' return Contact.find_by_number(number)
# # 20:30 import pickle from contact import Contact from contact import Repository from address_book import AddressBook Contact.destroy_all() address_book = AddressBook() contact1 = Contact("p1", 1234567890, "*****@*****.**") contact2 = Contact("p2", 1234567890, "*****@*****.**") contact3 = Contact("p3", 1234567890, "*****@*****.**") contact = Contact.find_by_number()