Completed
Push — master ( 874f22...ba55f4 )
by Jace
24s
created

TestLatest.test_get_latest()   A

Complexity

Conditions 4

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
dl 0
loc 6
rs 9.2
c 0
b 0
f 0
1
# pylint: disable=unused-variable,expression-not-assigned
2
3
from expecter import expect
0 ignored issues
show
Configuration introduced by
The import expecter could not be resolved.

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
4
5
6 View Code Duplication
def describe_latest():
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
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