Beispiel #1
0
def test_get_post_thumbnail_url(input_mime_type, config_injector):
    config_injector({'data_url': 'http://example.com/'})
    post = db.Post()
    post.post_id = 1
    post.mime_type = input_mime_type
    assert posts.get_post_thumbnail_url(post) \
        == 'http://example.com/generated-thumbnails/1.jpg'
Beispiel #2
0
def test_get_post_thumbnail_url(input_mime_type, config_injector):
    config_injector({'data_url': 'http://example.com/', 'secret': 'test'})
    post = model.Post()
    post.post_id = 1
    post.mime_type = input_mime_type
    assert posts.get_post_thumbnail_url(post) \
        == 'http://example.com/generated-thumbnails/1_244c8840887984c4.jpg'
Beispiel #3
0
def test_get_post_thumbnail_url(input_mime_type, config_injector):
    config_injector({"data_url": "http://example.com/", "secret": "test"})
    post = model.Post()
    post.post_id = 1
    post.mime_type = input_mime_type
    assert (posts.get_post_thumbnail_url(post) ==
            "http://example.com/generated-thumbnails/1_244c8840887984c4.jpg")
Beispiel #4
0
def test_get_post_thumbnail_url(input_mime_type, config_injector):
    config_injector({'data_url': 'http://example.com/'})
    post = db.Post()
    post.post_id = 1
    post.mime_type = input_mime_type
    assert posts.get_post_thumbnail_url(post) \
        == 'http://example.com/generated-thumbnails/1.jpg'