File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,10 @@ def given(self, provider_state):
149149 self ._interactions [0 ]['provider_state' ] = provider_state
150150 return self
151151
152+ @staticmethod
153+ def _normalize_consumer_name (name ):
154+ return name .lower ().replace (' ' , '_' )
155+
152156 def publish (self ):
153157 """Publish the generated pact files to the specified pact broker."""
154158 if self .broker_base_url is None \
@@ -157,8 +161,10 @@ def publish(self):
157161 "Did you expect the PACT_BROKER_BASE_URL " +
158162 "environment variable to be set?" )
159163
160- pact_files = fnmatch .filter (os .listdir (self .pact_dir ),
161- self .consumer .name + '*.json' )
164+ pact_files = fnmatch .filter (
165+ os .listdir (self .pact_dir ),
166+ self ._normalize_consumer_name (self .consumer .name ) + '*.json'
167+ )
162168 command = [
163169 BROKER_CLIENT_PATH ,
164170 'publish' ,
You can’t perform that action at this time.
0 commit comments