Пример #1
0
 def test_display_balance_incorrect_pin(self):
     balance = display_balance(2299, 'user1')
     self.assertEqual(balance, 'Access denied: incorrect PIN.')
Пример #2
0
 def test_display_balance_correct_pin_user1(self):
     balance = display_balance(1234, 'user1')
     self.assertEqual(balance, 'This is your current balance: 100 EUR')
Пример #3
0
 def test_first_user_correct_pin(self):
     displayed_amount = display_balance(1234, "user1")
     self.assertEqual(displayed_amount, "This is your current amount of money: 2000")
Пример #4
0
 def test_third_user_incorrect_pin(self):
     incorrect_pin = 1111
     correct_user = "******"
     displayed_amount = display_balance(incorrect_pin, correct_user)
     self.assertEqual(displayed_amount, "INCORRECT PIN")
Пример #5
0
 def test_third_user_correct_pin(self):
     displayed_amount = display_balance(3456, "user3")
     self.assertEqual(displayed_amount, "This is your current amount of money: 4000")
Пример #6
0
 def test_second_user_correct_pin(self):
     displayed_amount = display_balance(2222, "user2")
     self.assertEqual(displayed_amount, "This is your current amount of money: 3000")
Пример #7
0
 def test_first_user_incorrect_pin(self):
     incorrect_pin = 1111
     correct_user = '******'
     result = display_balance(incorrect_pin, correct_user)
     self.assertEqual(result, 'Incorrect PIN!!!')