def test_live_order_on_boundry(monkeypatch): monkeypatch.setattr(time, 'time', lambda: check_ts) is_cold = order._is_cold(time.time(), test_order['ts'], seconds(5)) assert is_cold == False, "order should be cold on the boundry"
def test_live_order_off_boundry(monkeypatch): monkeypatch.setattr(time, 'time', lambda: check_ts) is_cold = order._is_cold(time.time(), test_order['ts'], seconds(4)) assert is_cold == True, "order should be live off the boundry"
def test_live_order(monkeypatch): monkeypatch.setattr(time, 'time', lambda: check_ts) is_cold = order._is_cold(time.time(), test_order['ts'], seconds(1)) assert is_cold == True, "is_cold returned False but the order wasn't cold"