Skip to content

Commit

Permalink
fixed all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
peshay committed Dec 16, 2017
1 parent 5d4ab0f commit cda2118
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions btcde.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def createOrder(conn, OrderType, trading_pair, max_amount, price, **args):
def deleteOrder(conn, order_id, trading_pair):
"""Delete an Order."""
newuri = orderuri + "/" + order_id + "/" + trading_pair
params = {'order_id': order_id, 'trading_pair': trading_pair}
params = {}
return APIConnect(conn, 'DELETE', params, newuri)


Expand All @@ -163,7 +163,7 @@ def showMyOrders(conn, **args):
def showMyOrderDetails(conn, order_id):
"""Details to an own Order."""
newuri = orderuri + '/' + order_id
params = {'order_id': order_id}
params = {}
return APIConnect(conn, 'GET', params, newuri)


Expand All @@ -182,7 +182,7 @@ def showMyTrades(conn, **args):
def showMyTradeDetails(conn, trade_id):
"""Details to a specific Trade."""
newuri = tradeuri + '/' + trade_id
params = {'trade_id': trade_id}
params = {}
return APIConnect(conn, 'GET', params, newuri)


Expand Down
4 changes: 1 addition & 3 deletions tests/test_btcde_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,12 @@ def test_signature_delete(self, m):
'''Test the signature on a delete request.'''
order_id = 'A1234BC'
trading_pair = 'btceur'
params = {'order_id': order_id,
'trading_pair': trading_pair}
m.delete(requests_mock.ANY, json={}, status_code=200)
btcde.deleteOrder(self.conn, order_id, trading_pair)
history = m.request_history
request_signature = history[0].headers.get('X-API-SIGNATURE')
url = btcde.orderuri + "/" + order_id + "/" + trading_pair
verified_signature = self.verifySignature(url, 'DELETE', params)
verified_signature = self.verifySignature(url, 'DELETE', {})
self.assertEqual(request_signature, verified_signature)

def test_show_orderbook(self, m):
Expand Down

0 comments on commit cda2118

Please sign in to comment.