def test_accessing_missing_DocumentStore_content(): store = suds.store.DocumentStore() assert store.open("missing-content") is None assert store.open("buga-wuga://missing-content") is None assert store.open("ftp://missing-content") is None assert store.open("http://missing-content") is None assert store.open("https://missing-content") is None pytest.raises(Exception, store.open, "suds://missing-content")
def __test_open(store, location, expected_content): assert store.open(location) is expected_content assert store.open("buga-wuga://%s" % location) is expected_content assert store.open("ftp://%s" % location) is expected_content assert store.open("http://%s" % location) is expected_content assert store.open("https://%s" % location) is expected_content assert store.open("suds://%s" % location) is expected_content