コード例 #1
0
def test_camo_url():
    c_url = filters._camo_url(
        "https://camo.example.net/",
        "fake key",
        "http://example.com/image.jpg",
    )
    assert c_url == (
        "https://camo.example.net/b410d235a3d2fc44b50ccab827e531dece213062/"
        "687474703a2f2f6578616d706c652e636f6d2f696d6167652e6a7067")
コード例 #2
0
def test_camo_url():
    c_url = filters._camo_url(
        "https://camo.example.net/",
        "fake key",
        "http://example.com/image.jpg",
    )
    assert c_url == (
        "https://camo.example.net/b410d235a3d2fc44b50ccab827e531dece213062/"
        "687474703a2f2f6578616d706c652e636f6d2f696d6167652e6a7067")
コード例 #3
0
ファイル: test_filters.py プロジェクト: miketheman/warehouse
def test_camo_url():
    request = pretend.stub(registry=pretend.stub(
        settings={
            "camo.url": "https://camo.example.net/",
            "camo.key": "fake key"
        }))
    c_url = filters._camo_url(request, "http://example.com/image.jpg")
    assert c_url == (
        "https://camo.example.net/b410d235a3d2fc44b50ccab827e531dece213062/"
        "687474703a2f2f6578616d706c652e636f6d2f696d6167652e6a7067")
コード例 #4
0
ファイル: test_filters.py プロジェクト: craig5/warehouse
def test_camo_url():
    request = pretend.stub(
        registry=pretend.stub(
            settings={"camo.url": "https://camo.example.net/", "camo.key": "fake key"}
        )
    )
    c_url = filters._camo_url(request, "http://example.com/image.jpg")
    assert c_url == (
        "https://camo.example.net/b410d235a3d2fc44b50ccab827e531dece213062/"
        "687474703a2f2f6578616d706c652e636f6d2f696d6167652e6a7067"
    )