Exemple #1
0
def test_api_token_from_env():
    os.environ["DIGITAL_OCEAN_TOKEN"] = "testtoken"
    assert api_token_from_env() == "testtoken"
Exemple #2
0
def test_api_token_from_env():
    os.environ['DIGITAL_OCEAN_TOKEN'] = 'testtoken'
    assert api_token_from_env() == 'testtoken'
Exemple #3
0
def test_api_token_from_env_nil():
    with pytest.raises(LookupError):
        os.environ.pop("DIGITAL_OCEAN_TOKEN")
        api_token_from_env()
Exemple #4
0
def test_api_token_from_env_nil():
    with pytest.raises(LookupError):
        os.environ.pop('DIGITAL_OCEAN_TOKEN')
        api_token_from_env()