Exemplo n.º 1
0
    def test_typing(self):
        b = SubmitSmRespBill(self.user)

        self.assertRaises(InvalidBillKeyError, b.getAmount, 'anyKey')
        self.assertRaises(InvalidBillKeyError, b.getAction, 'anyKey')
        self.assertRaises(InvalidBillKeyError, b.setAmount, 'anyKey', 0)
        self.assertRaises(InvalidBillKeyError, b.setAction, 'anyKey', 0)
        self.assertRaises(InvalidBillValueError, b.setAmount, 'submit_sm_resp',
                          'A')
Exemplo n.º 2
0
    def test_amounts(self):
        b = SubmitSmRespBill(self.user)

        b.setAmount('submit_sm_resp', 2)
        self.assertEqual(b.getAmount('submit_sm_resp'), 2)
        self.assertEqual(b.getTotalAmounts(), 2)
Exemplo n.º 3
0
    def test_amounts(self):
        b = SubmitSmRespBill(self.user)

        b.setAmount('submit_sm_resp', 2)
        self.assertEqual(b.getAmount('submit_sm_resp'), 2)
        self.assertEqual(b.getTotalAmounts(), 2)
Exemplo n.º 4
0
    def test_default(self):
        b = SubmitSmRespBill(self.user)

        self.assertEqual(b.getAmount('submit_sm_resp'), 0.0)
        self.assertNotEquals(b.bid, None)
        self.assertEqual(b.user, self.user)
Exemplo n.º 5
0
    def test_default(self):
        b = SubmitSmRespBill(self.user)

        self.assertEqual(b.getAmount('submit_sm_resp'), 0.0)
        self.assertNotEquals(b.bid, None)
        self.assertEqual(b.user, self.user)