Ejemplo n.º 1
0
 def test_c2b_post_save_signal(self, mock_signal, mock_post, mock_get):
     post_save.connect(mock_signal,
                       sender=OnlineCheckout,
                       dispatch_uid='test_online_request_post_save')
     Mpesa.stk_push(phone=254708374149, amount=100.0)
     self.assertEquals(mock_signal.call_count, 1)
     post_save.disconnect(mock_signal,
                          sender=OnlineCheckout,
                          dispatch_uid='test_online_request_post_save')
Ejemplo n.º 2
0
 def setUp(self):
     self.request = Mpesa.stk_push(phone=254708374149,
                                   amount=100.0,
                                   account_reference='Test')
Ejemplo n.º 3
0
 def setUp(self):
     self.request = Mpesa.stk_push(phone=254708374149, amount=100.0)