Exemple #1
0
def test_ticker():
    ''' Method for testing ticker '''
    data = json.loads(okc.get_current_ticker())
    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 greater than zero")