Skip to content

Commit

Permalink
Update more tests for new /spans route method
Browse files Browse the repository at this point in the history
  • Loading branch information
anticorrelator committed Apr 12, 2024
1 parent cf01d3f commit aa6fe6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/session/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ def test_query_spans(client: Client, endpoint: str, dataframe: pd.DataFrame):
df0, df1 = dataframe.iloc[:1, :], dataframe.iloc[1:, :]
url = urljoin(endpoint, "v1/spans")

responses.get(url, body=b"".join([_df_to_bytes(df0), _df_to_bytes(df1)]))
responses.post(url, body=b"".join([_df_to_bytes(df0), _df_to_bytes(df1)]))
query = SpanQuery()
dfs = client.query_spans(query, query)
assert len(dfs) == 2
assert_frame_equal(dfs[0], df0)
assert_frame_equal(dfs[1], df1)

responses.get(url, status=404)
responses.post(url, status=404)
assert client.query_spans(query) is None

responses.get(url, body=_df_to_bytes(df0))
responses.post(url, body=_df_to_bytes(df0))
assert_frame_equal(client.query_spans(query), df0)

responses.get(url, body=_df_to_bytes(df1))
responses.post(url, body=_df_to_bytes(df1))
assert_frame_equal(client.query_spans(), df1)


Expand Down

0 comments on commit aa6fe6f

Please sign in to comment.