def test_get_key_url_bad_keyname(fake_bucket): key_template = "fakebucket mycroft/stream/{0}/schema/{1}/schema.yaml" k_instance = key_template.format('logname0', 'va') with pytest.raises(S3ResponseError) as e: get_key_url(fake_bucket, 'logname0', 'va') assert e.value.status == 404 assert e.value.reason == "{0} pair is not in s3".format(k_instance)
def test_get_key_url(fake_bucket): return_value = get_key_url(fake_bucket, 'logname1', 'va') assert return_value is not None