mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-24 02:03:02 +08:00
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
@@ -7,19 +7,19 @@ from models import ConversationVariable
|
||||
def test_from_variable_and_to_variable():
|
||||
variable = factory.build_variable_from_mapping(
|
||||
{
|
||||
'id': str(uuid4()),
|
||||
'name': 'name',
|
||||
'value_type': SegmentType.OBJECT,
|
||||
'value': {
|
||||
'key': {
|
||||
'key': 'value',
|
||||
"id": str(uuid4()),
|
||||
"name": "name",
|
||||
"value_type": SegmentType.OBJECT,
|
||||
"value": {
|
||||
"key": {
|
||||
"key": "value",
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
conversation_variable = ConversationVariable.from_variable(
|
||||
app_id='app_id', conversation_id='conversation_id', variable=variable
|
||||
app_id="app_id", conversation_id="conversation_id", variable=variable
|
||||
)
|
||||
|
||||
assert conversation_variable.to_variable() == variable
|
||||
|
||||
Reference in New Issue
Block a user