summaryrefslogtreecommitdiffstats
path: root/tests/test_import_legacy.py
diff options
context:
space:
mode:
authortermie <github@anarkystic.com>2012-02-13 20:34:46 -0800
committertermie <github@anarkystic.com>2012-02-13 20:34:46 -0800
commited793ad5365e33e2fda54c3900c1ad9b2c93dc37 (patch)
tree2c47802563d058ec65bf5c7ee6d791be7fec473c /tests/test_import_legacy.py
parentb4096290d149a04d5f3691025ad4adbfb4f4d4eb (diff)
downloadkeystone-ed793ad5365e33e2fda54c3900c1ad9b2c93dc37.tar.gz
keystone-ed793ad5365e33e2fda54c3900c1ad9b2c93dc37.tar.xz
keystone-ed793ad5365e33e2fda54c3900c1ad9b2c93dc37.zip
make sure passwords work after migration
Change-Id: I0086a362d772bf158e3fdc12fb42c1c7c50d50dd
Diffstat (limited to 'tests/test_import_legacy.py')
-rw-r--r--tests/test_import_legacy.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/test_import_legacy.py b/tests/test_import_legacy.py
index 05517985..2db34cb8 100644
--- a/tests/test_import_legacy.py
+++ b/tests/test_import_legacy.py
@@ -44,21 +44,36 @@ class ImportLegacy(test.TestCase):
migration = legacy.LegacyMigration('sqlite:///%s' % db_path)
migration.migrate_all()
- user_ref = self.identity_api.get_user('1')
+ admin_id = '1'
+ user_ref = self.identity_api.get_user(admin_id)
self.assertEquals(user_ref['name'], 'admin')
+ # check password hashing
+ user_ref, tenant_ref, metadata_ref = self.identity_api.authenticate(
+ user_id=admin_id, password='secrete')
+
def test_import_diablo(self):
db_path = self.setup_old_database('legacy_diablo.sqlite')
migration = legacy.LegacyMigration('sqlite:///%s' % db_path)
migration.migrate_all()
- user_ref = self.identity_api.get_user('1')
+ admin_id = '1'
+ user_ref = self.identity_api.get_user(admin_id)
self.assertEquals(user_ref['name'], 'admin')
+ # check password hashing
+ user_ref, tenant_ref, metadata_ref = self.identity_api.authenticate(
+ user_id=admin_id, password='secrete')
+
def test_import_essex(self):
db_path = self.setup_old_database('legacy_essex.sqlite')
migration = legacy.LegacyMigration('sqlite:///%s' % db_path)
migration.migrate_all()
- user_ref = self.identity_api.get_user('c93b19ea3fa94484824213db8ac0afce')
+ admin_id = 'c93b19ea3fa94484824213db8ac0afce'
+ user_ref = self.identity_api.get_user(admin_id)
self.assertEquals(user_ref['name'], 'admin')
+
+ # check password hashing
+ user_ref, tenant_ref, metadata_ref = self.identity_api.authenticate(
+ user_id=admin_id, password='secrete')