def test_datetime_format_as_datetime(): fb = Stock("FB", date_format="datetime") fb.delayed_quote() assert type(fb.delayed_quote().get("processedTime")) == datetime.datetime
def test_datetime_format_as_isoformat(): fb = Stock("FB", date_format="isoformat") assert type(fb.delayed_quote().get("processedTime")) == str
def test_delayed_quote(): fb = Stock("FB") fb.delayed_quote() assert type(fb.delayed_quote().get("delayedPrice")) == float