Issues (59)

tests/test_latest.py (1 issue)

Severity
1
# pylint: disable=unused-variable,expression-not-assigned
2
3
from expecter import expect
0 ignored issues
show
Unable to import 'expecter'
Loading history...
4
5
6
def describe_latest():
7
8
    def it_returns_filtered_images_by_default(client):
9
        response = client.get("/latest")
10
11
        expect(response.status_code) == 200
12
        expect(response.mimetype) == 'text/html'
13
        expect(response.get_data(as_text=True)).contains(
14
            'src="/latest1.jpg?filtered=true&')
15
16
    def it_returns_unfiltered_images_when_nsfw(client):
17
        response = client.get("/latest?nsfw=true")
18
19
        expect(response.status_code) == 200
20
        expect(response.mimetype) == 'text/html'
21
        expect(response.get_data(as_text=True)).contains(
22
            'src="/latest1.jpg?filtered=false&')
23