Skip to content

Commit 2ac92ff

Browse files
committed
chore: flake8 lint
1 parent 0c5f3ab commit 2ac92ff

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

examples/message/tests/consumer/test_message_consumer.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_put_file(pact_no_publish):
106106

107107
expected_event = {
108108
"event": "ObjectCreated:Put",
109-
"documentName": Term("^.*\\.(doc|docx)$",'document.doc'),
109+
"documentName": Term("^.*\\.(doc|docx)$", 'document.doc'),
110110
"creator": Like("TP"),
111111
"documentType": "microsoft-word",
112112
}
@@ -138,7 +138,7 @@ def test_publish_to_broker(pact):
138138

139139
expected_event = {
140140
"event": "ObjectCreated:Delete",
141-
"documentName": Term("^.*\\.(doc|docx)$",'document.doc'),
141+
"documentName": Term("^.*\\.(doc|docx)$", 'document.doc'),
142142
"creator": Like("TP"),
143143
"documentType": "microsoft-word",
144144
}
@@ -152,9 +152,6 @@ def test_publish_to_broker(pact):
152152
}))
153153

154154
with pact:
155-
# call matchers.get_generated_values(expected_event) to
156-
# reify/strip the expected_event of the matchers used
157-
# for Pact
158155
MessageHandler(matchers.get_generated_values(expected_event))
159156

160157
progressive_delay(f"{PACT_FILE}")

pact/message_pact.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from .broker import Broker
99
from .constants import MESSAGE_PATH
10-
from .matchers import Term, from_term, get_generated_values
10+
from .matchers import from_term
1111

1212

1313
class MessagePact(Broker):

tests/test_message_pact.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,12 @@ def test_definition_with_matchers_in_content(self):
158158

159159
self.assertEqual(
160160
target._messages[0]['contents'],
161-
{'name': 'John', 'document_name': 'sample_document.doc', 'document_style': {'data': {'generate': 'prose',
162-
'matcher': {'json_class': 'Regexp',
163-
'o': 0,
164-
's': 'prose|docs'}},
165-
'json_class': 'Pact::Term'}})
161+
{'name': 'John', 'document_name': 'sample_document.doc', 'document_style':
162+
{'data': {'generate': 'prose',
163+
'matcher': {'json_class': 'Regexp',
164+
'o': 0,
165+
's': 'prose|docs'}},
166+
'json_class': 'Pact::Term'}})
166167

167168
self.assertTrue({'contentType': 'application/json', 'source': 'legacy_api'}.items()
168169
<= target._messages[0]['metaData'].items())

0 commit comments

Comments
 (0)