Skip to content

Commit

Permalink
Merge pull request #24 from Bandwidth/task/trailing-space-and-whitepa…
Browse files Browse the repository at this point in the history
…ce-fixes

Add newlines and remove trailing spaces
  • Loading branch information
ajrice6713 committed Nov 4, 2022
2 parents 2550815 + c1c29e7 commit f600344
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ runs:
pip install wheel
python setup.py sdist bdist_wheel
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD
shell: bash
shell: bash
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pypony -st ./my_steps.yml -sp ./my_spec.yml -v
|:--------------------:|:------------|
| '-st', '--step' | Relative path to step file |
| '-sp', '--spec' | Relative path to spec file |
| '-v', '--verbpse' | Boolean verbose output (default=`False`) |
| '-v', '--verbose' | Boolean verbose output (default=`False`) |
| '-ff', '--fail-fast' | Option to fail fast if an exception is encountered (default=`False`) | # Coming soon!

## Step File
Expand Down
1 change: 1 addition & 0 deletions src/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/models/operation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion src/models/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def __init__(
headers: dict,
data: Union[dict, str],
):

self.status_code = status_code
self.headers = headers
self.data = data
18 changes: 9 additions & 9 deletions src/models/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@

class Step:
def __init__(
self,
self,
step: dict,
steps: dict,
):
for key in step:
step[key] = evaluate(step[key], steps)

self.name = step['name']
self.operation_id = step['operation_id']
self.method = step['method']
self.path = step['path']
self.status_code = step['status_code']

if 'headers' in step:
self.headers = step['headers']
self.headers = step['headers']
else:
self.headers = None

if 'body' in step:
self.body = step['body']
self.body = step['body']
else:
self.body = None

if 'raw_body' in step:
self.body = step['raw_body']

if 'params' in step:
self.params = step['params']
self.params = step['params']
else:
self.params = None

if 'auth' in step:
self.auth = step['auth']
self.auth = step['auth']
else:
self.auth = None

Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/valid/specs/person_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
version: 1.0.0
servers:
- url: http://example.com
tags:
tags:
- name: People
paths:
/person:
Expand Down
1 change: 1 addition & 0 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit f600344

Please sign in to comment.