Example #1
0
 def test_orders(cls):
     ''' method for testing orders '''
     orders = cfc.get_current_orders(cls.SYMBOL)
     ok_(len(orders["asks"]) > 0, "Asks array shd not be empty")
     ok_(len(orders["bids"]) > 0, "Bids array shd not be empty")
     ok_(orders["source"] == "CryptoFacility", "Src shd = 'CryptoFacility'")
     ok_(float(orders["timestamp"]) > 0, "Timestamp shd be > zero")
Example #2
0
 def test_ticker(cls):
     ''' method for testing ticker '''
     data = json.loads(cfc.get_current_ticker())
     ok_(data["pair"] == cfc.CCY_DEFAULT, "shd be '%s'" % cfc.CCY_DEFAULT)
     ok_(data["ask"] > 0.00, "ask shd not be empty")
     ok_(data["bid"] > 0.00, "bid shd not be empty")
     ok_(data["bid"] <= data["ask"], "bid shd be <= ask")
     ok_(float(data["timestamp"]) > 0, "Timestamp should be > zero")
Example #3
0
 def test_bid(cls):
     ''' method for testing bid prices '''
     ok_(cfc.get_current_bid() > 0.00)
Example #4
0
 def test_ask(cls):
     ''' method for testing ask prices '''
     ok_(cfc.get_current_ask() > 0.00)
Example #5
0
 def test_price(cls):
     ''' method for testing last price '''
     ok_(cfc.get_current_price() > 0.00)