Exemplo n.º 1
0
 def assert_transaction(self, msg, direction, session_created):
     md = MessageMetadataHelper(self.vumi_helper.get_vumi_api(), msg)
     direction = {
         "inbound": BillingDispatcher.MESSAGE_DIRECTION_INBOUND,
         "outbound": BillingDispatcher.MESSAGE_DIRECTION_OUTBOUND,
     }[direction]
     self.assertEqual(self.billing_api.transactions, [{
         "account_number": md.get_account_key(),
         "message_id": msg["message_id"],
         "tag_pool_name": md.tag[0],
         "tag_name": md.tag[1],
         "message_direction": direction,
         "session_created": session_created,
     }])
Exemplo n.º 2
0
 def assert_transaction(self, msg, direction, session_created):
     md = MessageMetadataHelper(self.vumi_helper.get_vumi_api(), msg)
     direction = {
         "inbound": BillingDispatcher.MESSAGE_DIRECTION_INBOUND,
         "outbound": BillingDispatcher.MESSAGE_DIRECTION_OUTBOUND,
     }[direction]
     self.assertEqual(self.billing_api.transactions,
                      [{
                          "account_number": md.get_account_key(),
                          "message_id": msg["message_id"],
                          "tag_pool_name": md.tag[0],
                          "tag_name": md.tag[1],
                          "message_direction": direction,
                          "session_created": session_created,
                      }])