Ejemplo n.º 1
0
def parameters():
    bucket = "test-bucket"
    url = "test-url"
    key = Squrl.get_key(url)

    return {
        "bucket": bucket,
        "url": url,
        "key": key,
        "head_object": {
            "Bucket": bucket,
            "Key": key
        },
        "put_object": {
            "Bucket": bucket,
            "Key": key,
            "WebsiteRedirectLocation": url,
            "Expires": ANY,
            "ContentType": ANY
        }
    }
Ejemplo n.º 2
0
def test_get_key():
    key = Squrl.get_key("test-url")

    assert len(key) == 9
    assert key.startswith("u/")
Ejemplo n.º 3
0
def test_get_key(parameters):
    key = Squrl.get_key("test-url")

    assert len(key) == Squrl.key_length + 2
    assert key.startswith("u/")