Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_influxdb_client_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ async def test_query_async(self):
for item in cd.to_list():
assert item in result_list

assert {'data': 'database', 'reference': 'my_db', 'value': -1.0} in result_list
assert {'data': 'sql_query', 'reference': query, 'value': -1.0} in result_list
assert {'data': 'query_type', 'reference': 'sql', 'value': -1.0} in result_list
assert {'data': 'database', 'reference': 'my_db', 'value': -1.0, 'null_field': None} in result_list
assert {'data': 'sql_query', 'reference': query, 'value': -1.0, 'null_field': None} in result_list
assert {'data': 'query_type', 'reference': 'sql', 'value': -1.0, 'null_field': None} in result_list

def test_write_api_custom_options_no_error(self):
write_options = WriteOptions(write_type=WriteType.batching)
Expand Down
7 changes: 4 additions & 3 deletions tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,10 @@ async def test_query_async_table(self):
for item in cd.to_list():
assert item in result_list

assert {'data': 'database', 'reference': 'my_database', 'value': -1.0} in result_list
assert {'data': 'sql_query', 'reference': 'SELECT * FROM data', 'value': -1.0} in result_list
assert {'data': 'query_type', 'reference': 'sql', 'value': -1.0} in result_list
assert {'data': 'database', 'reference': 'my_database', 'value': -1.0, 'null_field': None} in result_list
assert {'data': 'sql_query', 'reference': 'SELECT * FROM data', 'value': -1.0,
'null_field': None} in result_list
assert {'data': 'query_type', 'reference': 'sql', 'value': -1.0, 'null_field': None} in result_list

@asyncio_run
async def test_query_async_delayed(self):
Expand Down
8 changes: 5 additions & 3 deletions tests/util/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ def __init__(self):
self.data = [
array(['temp', 'temp', 'temp']),
array(['kitchen', 'common', 'foyer']),
array([36.9, 25.7, 9.8])
array([36.9, 25.7, 9.8]),
array([None, None, None])
]
self.names = ['data', 'reference', 'value']
self.names = ['data', 'reference', 'value', 'null_field']

def to_tuples(self):
response = []
Expand Down Expand Up @@ -97,7 +98,8 @@ def do_get(self, context, ticket):
tkt_data = [
array([key]),
array([tkt[key]]),
array([-1.0])
array([-1.0]),
array([None])
]
result_table = concat_tables([result_table, Table.from_arrays(tkt_data, names=self.cd.names)])
return RecordBatchStream(result_table, options=self.options)
Expand Down
Loading