Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelboulton committed Jul 30, 2022
1 parent f2de1d4 commit d37413d
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 42 deletions.
4 changes: 3 additions & 1 deletion scripts/smoke.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ set -ex
PYVER=39

tox -c tox.ini \
-e py${PYVER}flakes \
-e py${PYVER}flakes

tox -c tox.ini \
-e py${PYVER} \
-e py${PYVER}-pytest6 \
-e py${PYVER}black \
Expand Down
1 change: 0 additions & 1 deletion tavern/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ def run_stage(sessions, stage, test_block_config):
test_block_config (dict): available variables for test
"""
stage = copy.deepcopy(stage)
name = stage["name"]

attach_stage_content(stage)

Expand Down
11 changes: 3 additions & 8 deletions tavern/request/base.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from abc import abstractmethod
import logging

logger = logging.getLogger(__name__)

from box import Box

logger = logging.getLogger(__name__)


class BaseRequest(object):
@property
@abstractmethod
def request_vars(self):
def request_vars(self) -> Box:
"""
Variables used in the request
Expand All @@ -22,8 +22,3 @@ def request_vars(self):
@abstractmethod
def run(self):
"""Run test"""

@property
@abstractmethod
def request_vars(self) -> Box:
"""Get any extra variables used for this request"""
31 changes: 0 additions & 31 deletions tests/integration/test_fixtures.tavern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,34 +140,3 @@ stages:
status_code: 200
json:
value: "{autouse_thing_named}"

---

test_name: Test tincture

includes:
- !include common.yaml

marks:
- usefixtures:
- yielder
- str_fixture
- yield_str_fixture

stages:
- name: do something
tinctures:
- function: tavern.testutils.helpers:time_request
- function: tavern.testutils.helpers:print_response
extra_kwargs:
extra_print: "blooble"
request:
url: "{host}/echo"
method: POST
json:
value: "{str_fixture}"
response:
status_code: 200
json:
value: "{yield_str_fixture}"
f: gf
29 changes: 29 additions & 0 deletions tests/integration/test_tincture.tavern.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---

test_name: Test tincture

includes:
- !include common.yaml

marks:
- usefixtures:
- yielder
- str_fixture
- yield_str_fixture

stages:
- name: do something
tinctures:
- function: tavern.testutils.helpers:time_request
- function: tavern.testutils.helpers:print_response
extra_kwargs:
extra_print: "blooble"
request:
url: "{host}/echo"
method: POST
json:
value: "{str_fixture}"
response:
status_code: 200
json:
value: "{yield_str_fixture}"
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ commands =
[testenv:py39lint]
basepython = python3.9
commands =
pylint tavern/ -j 4
pylint tavern/ -j 0

[testenv:py39flakes]
skip_install = true
Expand Down

0 comments on commit d37413d

Please sign in to comment.