Esempio n. 1
0
 def tearDown(self):
     i.close_acc()
     i.trans('TM_BANK')
     i.idle()
     super(AccountTestCase, self).tearDown()
Esempio n. 2
0
 def test_invalid_trans(self):
     expected = "531 Invalid account state\n"
     i.open_acc()
     response = i.trans('TM_BANK')
     return self.assertEqual(expected, response)
Esempio n. 3
0
 def test_valid_below(self):
     i.art_reg(59922827, 1)
     i.close_acc()
     response = i.trans('TM_BANK', 3)
     return self.assertEqual(response, "240 3,99 Transaction succeeded\n")
Esempio n. 4
0
 def test_valid_exact(self):
     i.art_reg(59922827, 1)
     i.close_acc()
     response = i.trans('TM_BANK', 6, 99)
     return self.assertEqual(response, "240 0,00 Transaction succeeded\n")
Esempio n. 5
0
 def test_valid_neg_699(self):
     i.art_reg(59922827, 1)
     i.close_acc()
     response = i.trans('TM_CASH', -10)
     return self.assertEqual(response, "240 16,99 Transaction succeeded\n")
Esempio n. 6
0
 def test_valid_above(self):
     i.art_reg(59922827, 1)
     i.close_acc()
     response = i.trans('TM_BANK', 20)
     return self.assertEqual(response, "240 -13,01 Transaction succeeded\n")
Esempio n. 7
0
 def test_valid_negamnt(self):
     i.close_acc()
     response = i.trans('TM_BANK', -10)
     return self.assertEqual(response, "542 FI AMOUNT Transaction failed\n")
Esempio n. 8
0
 def test_invalid_method2(self):
     i.close_acc()
     response = i.trans('TM_CASHasd123')
     return self.assertEqual(response, "540 No Such Transaction method\n")
Esempio n. 9
0
 def test_valid_mthd(self):
     i.close_acc()
     response = i.trans('TM_BANK')
     return self.assertEqual(response, "240 0,00 Transaction succeeded\n")
Esempio n. 10
0
 def tearDown(self):
     i.trans('TM_CASH')
     i.idle()
     i.sign_off()
Esempio n. 11
0
def up_to_trans(method='TM_BANK'):
    up_to_close()
    return i.trans(method)