Esempio n. 1
0
                  " State: " + str(self.state) + "\n" +
                  " Country: " + str(self.country) + "\n")

        def delLastName(self):
            # TODO this is broken because dict key
            self.lastname = ''

# testing
if __name__ == '__main__':

    # Book class
    bookobj = Book('jfb_000')

    # add first contact
    Tests.testbook(bookobj=bookobj, firstname='Jesse', lastname='Bowman',
        phonenumber='423.555.3443', emailaddress='*****@*****.**',
        street='1506 12th Ave Unit 420', city='Seattle', state='WA',
        country='USA')

    # add second contact
    Tests.testbook(bookobj=bookobj, firstname='Clandor', lastname='Dinkles', phonenumber='555.341.3443',
                   emailaddress='*****@*****.**', street='1414', city='Bristol', state='TN', country='USA')

    # add third contact with shared values
    Tests.testbook(bookobj=bookobj, firstname='Jesse\'s', lastname='GF', phonenumber='205.555.1123',
                   emailaddress='*****@*****.**', street='', city='Seattle', state='WA',
                   country='USA')

    # add a fourth contact with different shared values (want to test searching by some matches and some not)
    Tests.testbook(bookobj=bookobj, firstname='Jesse', lastname='Other', phonenumber='423.555.3443',
                   emailaddress='*****@*****.**', street='1506 12th Ave Unit 421', city='Seattle', state='WA',
                   country='USA')