From 5663fc313f0c4a6d766fbf8170bf27dd81197a7c Mon Sep 17 00:00:00 2001 From: Edward Hope-Morley Date: Thu, 8 Aug 2013 12:12:27 +0100 Subject: Add unit test to check non-string password support Non-string passwords from keystoneclient are converted but we are not testing it so adding in a test case for this. Co-authored-by: r-sekine Fixes: bug #1210099 Change-Id: I666e9e0b7ce10d6efed9d98aee0dac09cf2cd066 --- keystone/tests/test_keystoneclient.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/keystone/tests/test_keystoneclient.py b/keystone/tests/test_keystoneclient.py index 0c323ddd..ff2462f4 100644 --- a/keystone/tests/test_keystoneclient.py +++ b/keystone/tests/test_keystoneclient.py @@ -535,6 +535,15 @@ class KeystoneClientTests(object): user = client.users.update_tenant( user=user, tenant=self.tenant_bar['id']) + def test_user_create_no_string_password(self): + from keystoneclient import exceptions as client_exceptions + client = self.get_client(admin=True) + self.assertRaises(client_exceptions.BadRequest, + client.users.create, + name='test_user', + password=12345, + email=uuid.uuid4().hex) + def test_user_create_no_name(self): from keystoneclient import exceptions as client_exceptions client = self.get_client(admin=True) -- cgit