Esempio 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')
Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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)