tests.test_api_fonts   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A describe_get() 0 7 1
A describe_post() 0 8 1
1
# pylint: disable=unused-variable,misplaced-comparison-constant,expression-not-assigned
2
3
from expecter import expect
0 ignored issues
show
introduced by
Unable to import 'expecter'
Loading history...
4
5
from .utils import load
6
7
8
def describe_get():
9
10
    def it_returns_a_list(client):
11
        status, data = load(client.get("/api/fonts/"))
12
13
        expect(status) == 200
14
        expect(data).contains('impact')
15
16
17
def describe_post():
18
19
    def new_fonts_are_created_using_github(client):
20
        status, data = load(client.post("/api/fonts/"))
21
22
        expect(status) == 403
23
        expect(data) == dict(
24
            message="https://raw.githubusercontent.com/jacebrowning/memegen/master/CONTRIBUTING.md"
25
        )
26