mirror of
https://github.com/langgenius/dify.git
synced 2026-09-24 23:22:26 +08:00
refactor(api): remove member field compatibility (#37966)
Co-authored-by: WH-2099 <wh2099@pm.me> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
This commit is contained in:
co-authored by
WH-2099
autofix-ci[bot]
Asuka Minato
parent
77ae583b44
commit
904fadde20
@@ -1,9 +1,8 @@
|
||||
from datetime import UTC, datetime
|
||||
from types import SimpleNamespace
|
||||
|
||||
from flask_restx import marshal
|
||||
|
||||
from fields.snippet_fields import snippet_list_fields
|
||||
from fields.snippet_fields import SnippetListItemResponse
|
||||
from libs.helper import dump_response
|
||||
|
||||
|
||||
def test_snippet_list_fields_include_author_name() -> None:
|
||||
@@ -24,6 +23,6 @@ def test_snippet_list_fields_include_author_name() -> None:
|
||||
updated_at=datetime.fromtimestamp(1704067201, tz=UTC),
|
||||
)
|
||||
|
||||
result = marshal(snippet, snippet_list_fields)
|
||||
result = dump_response(SnippetListItemResponse, snippet)
|
||||
|
||||
assert result["author_name"] == "Alice"
|
||||
|
||||
Reference in New Issue
Block a user