예제 #1
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")
예제 #2
0
 def test_wierd_stuff(self):
     i.art_reg(59922827, 0)
     i.art_reg_empty()
     response = i.close_acc()
     return self.assertEqual(response, "240 0,00 Transaction succeeded\n")
예제 #3
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")
예제 #4
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")
예제 #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")
예제 #6
0
 def test_amont_zero(self):
     expected = "501 Syntax error\n"
     response = i.art_reg(59922827, 0)
     return (self.assertEqual(expected, response))
예제 #7
0
 def test_neg_amount(self):
     expected = "501 Syntax error\n"
     response = i.art_reg(59922827, -2)
     return (self.assertEqual(expected, response))
예제 #8
0
 def test_with_amount(self):
     expected = "212 Multifilter kek:20,97:3\n232 3: 20,97 Article registered\n"
     response = i.art_reg(59922827, 3)
     return (self.assertEqual(expected, response))
예제 #9
0
 def test_no_amount(self):
     expected = "212 Multifilter kek:6,99\n232 1: 6,99 Article registered\n"
     response = i.art_reg(59922827)
     return (self.assertEqual(expected, response))