Skip to content

Commit f5caf9c

Browse files
Initial pact-python implementation
- Correct pact.matchers.from_term to only have one logic structure - Fix Pact.will_respond_with’s signature to a single line
1 parent bfb8380 commit f5caf9c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pact/matchers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def from_term(term):
186186
return term
187187
elif isinstance(term, (six.string_types, int, float)):
188188
return term
189-
if isinstance(term, dict):
189+
elif isinstance(term, dict):
190190
return {k: from_term(v) for k, v in term.items()}
191191
elif isinstance(term, list):
192192
return [from_term(t) for i, t in enumerate(term)]

pact/pact.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ def with_request(self, method, path, body=None, headers=None, query=None):
103103

104104
return self
105105

106-
def will_respond_with(
107-
self, status, headers=None, body=None):
106+
def will_respond_with(self, status, headers=None, body=None):
108107
"""
109108
Define the response the server is expected to create.
110109

0 commit comments

Comments
 (0)