Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Wellbore
Wellbore Domain Services
Commits
1a564843
Commit
1a564843
authored
Jun 30, 2021
by
Victor Dosda
Browse files
Added test for hybrid Api log (post data log v2, get data log v3)
parent
db3dedcb
Pipeline
#49249
passed with stages
in 6 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/routers/chunking_test.py
View file @
1a564843
...
...
@@ -230,14 +230,12 @@ def test_send_all_data_once(setup_client,
)
@
pytest
.
mark
.
parametrize
(
"entity_type"
,
[
entity
for
entity
in
EntityTypeParams
if
Definitions
[
entity
][
'api_version'
]
==
"v2"
])
@
pytest
.
mark
.
parametrize
(
"entity_type"
,
[
entity
for
entity
in
EntityTypeParams
if
Definitions
[
entity
][
'api_version'
]
==
"v2"
])
@
pytest
.
mark
.
parametrize
(
"content_type_header,create_func"
,
[
#('application/x-parquet', lambda df: df.to_parquet(engine="pyarrow")),
(
'application/json'
,
lambda
df
:
df
.
to_json
(
orient
=
'split'
,
date_format
=
'iso'
)),
])
@
pytest
.
mark
.
parametrize
(
"accept_content"
,
[
# 'application/x-parquet',
# 'text/csv; charset=utf-8',
'application/json'
,
])
@
pytest
.
mark
.
parametrize
(
"columns"
,
[
...
...
@@ -272,9 +270,6 @@ def test_send_all_data_once_post_data_v2_get_data_v3(setup_client,
assert
get_response
.
status_code
==
200
result_df
=
_create_df_from_response
(
get_response
)
if
content_type_header
.
endswith
(
'parquet'
)
and
accept_content
.
endswith
(
'json'
):
result_df
=
_cast_datetime_to_datetime64_ns
(
result_df
)
if
content_type_header
.
endswith
(
'json'
):
initial_data_df
=
pd
.
read_json
(
data_to_send
,
orient
=
'split'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment