| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 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 |