Skip to content

Commit ed7c538

Browse files
committed
Fix: use f-string in CLI log test
1 parent 3d9aeb7 commit ed7c538

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/test_cli_log.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,23 @@ def test_log_insert(git_repo): # pylint: disable=W0613
137137
)
138138
prompt2 = json.loads(result.output)[0]
139139

140-
chat3 = """{
140+
chat3 = f"""{{
141141
"model": "gpt-3.5-turbo",
142142
"messages": [
143-
{
143+
{{
144144
"role": "user",
145145
"content": "Let's continue with Topic 1."
146-
},
147-
{
146+
}},
147+
{{
148148
"role": "assistant",
149149
"content": "Sure!"
150-
}
150+
}}
151151
],
152-
"parent": "%s",
152+
"parent": "{prompt1['hash']}",
153153
"timestamp": 1630000000,
154154
"request_tokens": 300,
155155
"response_tokens": 300
156-
}""" % prompt1['hash']
156+
}}"""
157157
result = runner.invoke(
158158
main,
159159
['log', '--insert', chat3]

0 commit comments

Comments
 (0)