Skip to content

Commit

Permalink
Revert test_response.py changes.
Browse files Browse the repository at this point in the history
Commit b5b28b6 appears to have fixed the underlying problem that was necessitating these changes.
  • Loading branch information
SyntaxColoring committed Dec 10, 2024
1 parent 3414714 commit b00a4ec
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions robot-server/tests/service/json_api/test_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ class ResponseSpec(NamedTuple):
RESPONSE_SPECS = [
ResponseSpec(
subject=SimpleBody(data=_Resource(id="hello")),
expected={"data": {"id": "hello", "val": None}},
expected={"data": {"id": "hello"}},
),
ResponseSpec(
subject=Body(
data=_Resource(id="hello"),
links=_Links(sibling=ResourceLink(href="/bar")),
),
expected={
"data": {"id": "hello", "val": None},
"links": {"sibling": {"href": "/bar", "meta": None}},
"data": {"id": "hello"},
"links": {"sibling": {"href": "/bar"}},
},
),
ResponseSpec(
Expand All @@ -56,15 +56,15 @@ class ResponseSpec(NamedTuple):
),
ResponseSpec(
subject=EmptyBody(links=_Links(sibling=ResourceLink(href="/bar"))),
expected={"links": {"sibling": {"href": "/bar", "meta": None}}},
expected={"links": {"sibling": {"href": "/bar"}}},
),
ResponseSpec(
subject=SimpleMultiBody(
data=[_Resource(id="hello"), _Resource(id="goodbye")],
meta=MultiBodyMeta(cursor=1, totalLength=3),
),
expected={
"data": [{"id": "hello", "val": None}, {"id": "goodbye", "val": None}],
"data": [{"id": "hello"}, {"id": "goodbye"}],
"meta": {"cursor": 1, "totalLength": 3},
},
),
Expand All @@ -75,8 +75,8 @@ class ResponseSpec(NamedTuple):
meta=MultiBodyMeta(cursor=1, totalLength=3),
),
expected={
"data": [{"id": "hello", "val": None}, {"id": "goodbye", "val": None}],
"links": {"sibling": {"href": "/bar", "meta": None}},
"data": [{"id": "hello"}, {"id": "goodbye"}],
"links": {"sibling": {"href": "/bar"}},
"meta": {"cursor": 1, "totalLength": 3},
},
),
Expand Down

0 comments on commit b00a4ec

Please sign in to comment.