Exemple #1
0
def test_bad_url2dict(url, raises):
    with pytest.raises(raises):
        storefact.url2dict(url)
Exemple #2
0
def test_raise_on_invalid_store():
    with pytest.raises(ValueError):
        storefact.url2dict(u'dummy://foo/bar')
Exemple #3
0
def test_url2dict(url, expected):
    assert storefact.url2dict(url) == expected
Exemple #4
0
def test_json_decode():
    url, _ = ACTUAL_URL
    creds = storefact.url2dict(url)["credentials"]
    with open("tests/gcstore_cred_example.json") as file:
        assert json.loads(creds) == json.load(file)