Skip to content

Commit a1c19b6

Browse files
tuan-phamwilliaminfante
authored andcommitted
fix: add missing conftest
1 parent a98850a commit a1c19b6

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

examples/message/tests/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
def pytest_addoption(parser):
3+
parser.addoption(
4+
"--publish-pact", type=str, action="store",
5+
help="Upload generated pact file to pact broker with version"
6+
)
7+
8+
parser.addoption(
9+
"--provider-url", type=str, action="store",
10+
help="The url to our provider."
11+
)

pact/message_pact.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MessagePact():
3434
"""
3535

3636
# MANDATORY_FIELDS = {'providerStates', 'description', 'metaData', 'contents'}
37-
MANDATORY_FIELDS = {'description', 'contents'}
37+
MANDATORY_FIELDS = {'providerStates', 'description', 'contents'}
3838

3939
def __init__(self, consumer, provider, log_dir=None,
4040
publish_to_broker=False, broker_base_url=None, broker_username=None,
@@ -138,7 +138,7 @@ def _normalize_consumer_name(name):
138138
def write_to_pact_file(self):
139139
# for x in self._message_interactions:
140140
# temporarily assumed we only have a single message
141-
fake_data_set = {"contents": "whatever", "description": "description"}
141+
fake_data_set = {"providerStates":[{"name": "Test provider"}], "contents": "whatever", "description": "description"}
142142

143143
command = [
144144
MESSAGE_PATH,

0 commit comments

Comments
 (0)