mirror of
https://github.com/gogcom/galaxy-integrations-python-api.git
synced 2025-12-24 15:38:14 -05:00
17 lines
356 B
Python
17 lines
356 B
Python
import json
|
|
|
|
|
|
def create_message(request):
|
|
return json.dumps(request).encode() + b"\n"
|
|
|
|
|
|
def get_messages(write_mock):
|
|
messages = []
|
|
for call_args in write_mock.call_args_list:
|
|
data = call_args[0][0]
|
|
for line in data.splitlines():
|
|
message = json.loads(line)
|
|
messages.append(message)
|
|
return messages
|
|
|