Skip to content

Commit 39d61c6

Browse files
author
Grégory Starck
committed
Test workaround: server changed its response content in this case
That may still change in final release..
1 parent cb510ec commit 39d61c6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/influxdb/client_test_with_server.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,15 @@ def test_drop_database_fails(self):
313313
with self.assertRaises(InfluxDBClientError) as ctx:
314314
self.cli.drop_database('db')
315315
self.assertEqual(500, ctx.exception.code)
316-
self.assertEqual('{"results":[{"error":"database not found"}]}',
317-
ctx.exception.content)
316+
self.assertIn('{"results":[{"error":"database not found: db',
317+
ctx.exception.content)
318318

319319
def test_query_fail(self):
320320
with self.assertRaises(InfluxDBClientError) as ctx:
321321
self.cli.query('select column_one from foo')
322-
self.assertEqual(
323-
('500: {"results":[{"error":"database not found: db"}]}',),
324-
ctx.exception.args)
322+
self.assertEqual(500, ctx.exception.code)
323+
self.assertIn('{"results":[{"error":"database not found: db',
324+
ctx.exception.content)
325325

326326
############################################################################
327327

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