sites   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A step_impl() 0 5 1
1
import os
2
3
import requests
4
from behave import when, then
5
6
7
ALT_DOMAIN = os.environ.get('ALT_DOMAIN', 'butt.com')
8
9
10
@when(u'I go to the site on a different domain')
11
def step_impl(context):
12
    context.response = requests.get(
13
        context.base_url,
14
        headers={'Host': ALT_DOMAIN},
15
    )
16
17
18
@then(u'the request should succeed')
19
def step_impl(context):
20
    assert context.response.ok
21