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