Skip to content

Commit 60e4054

Browse files
committed
Fix test_create_user_blank_username
Creating a user with an empty password now returns a more expressive error message.
1 parent 68c95e5 commit 60e4054

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

influxdb/tests/server_tests/client_test_with_server.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ def test_get_list_users(self):
210210
def test_create_user_blank_username(self):
211211
with self.assertRaises(InfluxDBClientError) as ctx:
212212
self.cli.create_user('', 'secret_password')
213-
self.assertEqual(400, ctx.exception.code)
214-
self.assertIn('{"error":"error parsing query: '
215-
'found WITH, expected identifier',
213+
self.assertIn('username required',
216214
ctx.exception.content)
217215
rsp = list(self.cli.query("SHOW USERS")['results'])
218216
self.assertEqual(rsp, [])

0 commit comments

Comments
 (0)