Skip to content

Commit d0b87e3

Browse files
author
aviau
committed
Added test_query_bad_precision
1 parent 0818132 commit d0b87e3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/influxdb/client_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,14 @@ def test_query_fail(self):
217217
cli = InfluxDBClient('host', 8086, 'username', 'password', 'db')
218218
cli.query('select column_one from foo;')
219219

220+
def test_query_bad_precision(self):
221+
cli = InfluxDBClient()
222+
with self.assertRaisesRegexp(
223+
Exception,
224+
"Invalid time precision is given. \(use 's', 'm', 'ms' or 'u'\)"
225+
):
226+
cli.query('select column_one from foo', time_precision='g')
227+
220228
def test_create_database(self):
221229
with _mocked_session('post', 201, {"name": "new_db"}):
222230
cli = InfluxDBClient('host', 8086, 'username', 'password', 'db')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy