Beispiel #1
0
 def test_orders(cls):
     ''' orders test method '''
     ccy_id = cls.CcyToId(base.CCY_DEFAULT)
     orders = q.get_current_orders(ccy_id)
     ok_(len(orders["asks"]) > 0, "Asks array should not be empty")
     ok_(len(orders["bids"]) > 0, "Bids array should not be empty")
     ok_(orders["source"] == "Quoine", "Source should be 'Quoine'")
     ok_(float(orders["timestamp"]) > 0, "Timestamp should be > zero")
Beispiel #2
0
    def test_ticker(cls):
        ''' ticket test method '''

        data = json.loads(q.get_current_ticker(base.CCY_DEFAULT))
        ok_(data["pair"] == base.CCY_DEFAULT, "shd be '%s'" % base.CCY_DEFAULT)
        ok_(data["ask"] > 0.00, "ask should not be empty")
        ok_(data["bid"] > 0.00, "bid should not be empty")
        ok_(data["bid"] <= data["ask"], "bid should be < ask")
        ok_(float(data["timestamp"]) > 0, "Timestamp should be > zero")
Beispiel #3
0
 def test_bid(cls):
     ''' bid price test method '''
     ok_(q.get_current_bid(base.CCY_DEFAULT) > 0.00)
Beispiel #4
0
 def test_ask(cls):
     ''' ask price test method '''
     ok_(q.get_current_ask(base.CCY_DEFAULT) > 0.00)
Beispiel #5
0
 def test_price(cls):
     ''' last price test method '''
     ok_(q.get_current_price(base.CCY_DEFAULT) > 0.00)