diff options
author | Edward Hope-Morley <edward.hope-morley@canonical.com> | 2013-08-08 12:12:27 +0100 |
---|---|---|
committer | Morgan Fainberg <m@metacloud.com> | 2013-08-15 18:40:22 -0700 |
commit | 5663fc313f0c4a6d766fbf8170bf27dd81197a7c (patch) | |
tree | 2cfcaa45d80fb7533cbbdc8e5ef20ec0662e82f1 | |
parent | 7851a3cd62aa598c694bd51806f55ec26d3a54fe (diff) | |
download | keystone-5663fc313f0c4a6d766fbf8170bf27dd81197a7c.tar.gz keystone-5663fc313f0c4a6d766fbf8170bf27dd81197a7c.tar.xz keystone-5663fc313f0c4a6d766fbf8170bf27dd81197a7c.zip |
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 <r-sekine@intellilink.co.jp>
Fixes: bug #1210099
Change-Id: I666e9e0b7ce10d6efed9d98aee0dac09cf2cd066
-rw-r--r-- | keystone/tests/test_keystoneclient.py | 9 |
1 files changed, 9 insertions, 0 deletions
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) |