"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/test_v3_identity.py" between
keystone-17.0.0.tar.gz and keystone-18.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (latest release).

test_v3_identity.py  (keystone-17.0.0):test_v3_identity.py  (keystone-18.0.0)
skipping to change at line 1018 skipping to change at line 1018
self.get_request_token(self.user_ref['password'], self.get_request_token(self.user_ref['password'],
expected_status=http.client.CREATED) expected_status=http.client.CREATED)
class PasswordValidationTestCase(ChangePasswordTestCase): class PasswordValidationTestCase(ChangePasswordTestCase):
def setUp(self): def setUp(self):
super(PasswordValidationTestCase, self).setUp() super(PasswordValidationTestCase, self).setUp()
# passwords requires: 1 letter, 1 digit, 7 chars # passwords requires: 1 letter, 1 digit, 7 chars
self.config_fixture.config(group='security_compliance', self.config_fixture.config(group='security_compliance',
password_regex=( password_regex=(
'^(?=.*\d)(?=.*[a-zA-Z]).{7,}$')) r'^(?=.*\d)(?=.*[a-zA-Z]).{7,}$'))
def test_create_user_with_invalid_password(self): def test_create_user_with_invalid_password(self):
user = unit.new_user_ref(domain_id=self.domain_id) user = unit.new_user_ref(domain_id=self.domain_id)
user['password'] = 'simple' user['password'] = 'simple'
self.post('/users', body={'user': user}, token=self.get_admin_token(), self.post('/users', body={'user': user}, token=self.get_admin_token(),
expected_status=http.client.BAD_REQUEST) expected_status=http.client.BAD_REQUEST)
def test_update_user_with_invalid_password(self): def test_update_user_with_invalid_password(self):
user = unit.create_user(PROVIDERS.identity_api, user = unit.create_user(PROVIDERS.identity_api,
domain_id=self.domain['id']) domain_id=self.domain['id'])
user['password'] = 'simple' user['password'] = 'simple'
self.patch('/users/%(user_id)s' % { self.patch('/users/%(user_id)s' % {
'user_id': user['id']}, 'user_id': user['id']},
body={'user': user}, body={'user': user},
expected_status=http.client.BAD_REQUEST) expected_status=http.client.BAD_REQUEST)
def test_changing_password_with_simple_password_strength(self): def test_changing_password_with_simple_password_strength(self):
# password requires: any non-whitespace character # password requires: any non-whitespace character
self.config_fixture.config(group='security_compliance', self.config_fixture.config(group='security_compliance',
password_regex='[\S]+') password_regex=r'[\S]+')
self.change_password(password='simple', self.change_password(password='simple',
original_password=self.user_ref['password'], original_password=self.user_ref['password'],
expected_status=http.client.NO_CONTENT) expected_status=http.client.NO_CONTENT)
def test_changing_password_with_strong_password_strength(self): def test_changing_password_with_strong_password_strength(self):
self.change_password(password='mypassword2', self.change_password(password='mypassword2',
original_password=self.user_ref['password'], original_password=self.user_ref['password'],
expected_status=http.client.NO_CONTENT) expected_status=http.client.NO_CONTENT)
def test_changing_password_with_strong_password_strength_fails(self): def test_changing_password_with_strong_password_strength_fails(self):
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)