mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 12:03:46 +00:00 
			
		
		
		
	generate-integration-docs-screenshot: Support plain/text payloads.
All *.txt fixtures were assumed to only contain URL parameters, now fixtures with plain/text payloads are also supported.
This commit is contained in:
		| @@ -193,13 +193,19 @@ def send_bot_payload_message( | ||||
|         extra_args = {"data": data} | ||||
|  | ||||
|     elif not json_fixture and data: | ||||
|         # We overwrite any params in fixture with our params. stream name, for | ||||
|         # example, may be defined in the fixture. | ||||
|         assert isinstance(data, str) | ||||
|  | ||||
|         # fixtures with url parameters | ||||
|         if "&" in data: | ||||
|             # Overwrite the fixture params, in case of overlap. | ||||
|             parsed_params = dict(parse_qsl(data)) | ||||
|             parsed_params.update(params) | ||||
|             params = parsed_params | ||||
|  | ||||
|         # fixtures with plain/text payload | ||||
|         else: | ||||
|             extra_args = {"data": data} | ||||
|  | ||||
|     elif config.payload_as_query_param: | ||||
|         params[config.payload_param_name] = orjson.dumps(data).decode() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user