def test_create_wrong_credentials(): """ Test init with wrong credentials - should raise an exception """ with pytest.raises(pds.DatastreamException): assert pds.Datastream("USERNAME", "PASSWORD")
def init_datastream(): """ Create an instance of datastream """ return pds.Datastream(os.environ['DSWS_USER'], os.environ['DSWS_PASS'])
def empty_datastream(): """ Create an instance of datastream """ with warnings.catch_warnings(): warnings.simplefilter("ignore") return pds.Datastream(None, None)