def test_change_only_last_name_data(self): print(f'\n-------Test Change Only Last Name Data--------') new_man = Man('Edward', 'George', 'Second', 'Starbucks street 5', '+7 (912) 754-35-07', 35) new_man.change(last_name='Ivanov') new_man.print() self.assertEqual(new_man.data(), 'Name : Edward Ivanov Second\n' 'Home address : Starbucks street 5\n' 'Phone number : +7 (912) 754-35-07\n' 'Age : 35')
def test_change_only_phone_number_data(self): print(f'\n-------Test Change Only Phone Number Data--------') new_man = Man('Edward', 'George', 'Second', 'Starbucks street 5', '+7 (912) 754-35-07', 35) new_man.change(phone_number='8 (800) 555-35-35') new_man.print() self.assertEqual(new_man.data(), 'Name : Edward George Second\n' 'Home address : Starbucks street 5\n' 'Phone number : 8 (800) 555-35-35\n' 'Age : 35')
def test_change_zero_data(self): print(f'\n-------Test Change Zero Data--------') new_man = Man('Edward', 'George', 'Second', 'Starbucks street 5', '+7 (912) 754-35-07', 35) new_man.change() new_man.print() self.assertEqual(new_man.data(), 'Name : Edward George Second\n' 'Home address : Starbucks street 5\n' 'Phone number : +7 (912) 754-35-07\n' 'Age : 35')
def test_change_only_home_address_data(self): print(f'\n-------Test Change Only Home Address Data--------') new_man = Man('Edward', 'George', 'Second', 'Starbucks street 5', '+7 (912) 754-35-07', 35) new_man.change(home_address='Kominterna street 2') new_man.print() self.assertEqual(new_man.data(), 'Name : Edward George Second\n' 'Home address : Kominterna street 2\n' 'Phone number : +7 (912) 754-35-07\n' 'Age : 35')