def test_current_orders(self):
        mock_response = create_mock_json('tests/resources/list_current_orders.json')
        current_orders = mock_response.json().get('result')
        resource = resources.CurrentOrders(elapsed_time=self.ELAPSED_TIME,
                                           **current_orders)
        assert resource.elapsed_time == self.ELAPSED_TIME
        assert len(resource.orders) == len(current_orders.get('currentOrders'))

        for current_order in current_orders.get('currentOrders'):
            assert resource.orders[0].bet_id == current_order['betId']
    def test_current_orders(self):
        mock_response = create_mock_json('tests/resources/list_current_orders.json')
        current_orders = mock_response.json().get('result')
        resource = resources.CurrentOrders(date_time_sent=self.DATE_TIME_SENT,
                                           **current_orders)
        assert resource._datetime_sent == self.DATE_TIME_SENT
        assert len(resource.orders) == len(current_orders.get('currentOrders'))

        for current_order in current_orders.get('currentOrders'):
            assert resource.orders[0].bet_id == current_order['betId']
 def test_current_orders_description(self):
     mock_response = create_mock_json(
         "tests/resources/list_current_orders_description.json")
     current_orders = mock_response.json().get("result")
     resource = resources.CurrentOrders(elapsed_time=self.ELAPSED_TIME,
                                        **current_orders)
     assert resource.elapsed_time == self.ELAPSED_TIME
     assert len(resource.orders) == len(current_orders.get("currentOrders"))
     for current_order in current_orders.get("currentOrders"):
         assert resource.orders[0].bet_id == current_order["betId"]