"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/test_backend_id_mapping_sql.py" between
keystone-18.0.0.tar.gz and keystone-19.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 "Wallaby" series (latest release).

test_backend_id_mapping_sql.py  (keystone-18.0.0):test_backend_id_mapping_sql.py  (keystone-19.0.0)
skipping to change at line 153 skipping to change at line 153
# Check no mappings for the new local entity # Check no mappings for the new local entity
self.assertIsNone(PROVIDERS.id_mapping_api.get_public_id(local_entity)) self.assertIsNone(PROVIDERS.id_mapping_api.get_public_id(local_entity))
# Create the new mapping and then read it back # Create the new mapping and then read it back
public_id = PROVIDERS.id_mapping_api.create_id_mapping(local_entity) public_id = PROVIDERS.id_mapping_api.create_id_mapping(local_entity)
self.assertThat(mapping_sql.list_id_mappings(), self.assertThat(mapping_sql.list_id_mappings(),
matchers.HasLength(initial_mappings + 1)) matchers.HasLength(initial_mappings + 1))
self.assertEqual( self.assertEqual(
public_id, PROVIDERS.id_mapping_api.get_public_id(local_entity)) public_id, PROVIDERS.id_mapping_api.get_public_id(local_entity))
def test_id_mapping_handles_bytes(self):
initial_mappings = len(mapping_sql.list_id_mappings())
local_id = b'FaKeID'
local_entity = {'domain_id': self.domainA['id'],
'local_id': local_id,
'entity_type': mapping.EntityType.USER}
# Check no mappings for the new local entity
self.assertIsNone(PROVIDERS.id_mapping_api.get_public_id(local_entity))
# Create the new mapping and then read it back
public_id = PROVIDERS.id_mapping_api.create_id_mapping(local_entity)
self.assertThat(mapping_sql.list_id_mappings(),
matchers.HasLength(initial_mappings + 1))
self.assertEqual(
public_id, PROVIDERS.id_mapping_api.get_public_id(local_entity))
def test_delete_public_id_is_silent(self): def test_delete_public_id_is_silent(self):
# Test that deleting an invalid public key is silent # Test that deleting an invalid public key is silent
PROVIDERS.id_mapping_api.delete_id_mapping(uuid.uuid4().hex) PROVIDERS.id_mapping_api.delete_id_mapping(uuid.uuid4().hex)
def test_purge_mappings(self): def test_purge_mappings(self):
initial_mappings = len(mapping_sql.list_id_mappings()) initial_mappings = len(mapping_sql.list_id_mappings())
local_id1 = uuid.uuid4().hex local_id1 = uuid.uuid4().hex
local_id2 = uuid.uuid4().hex local_id2 = uuid.uuid4().hex
local_id3 = uuid.uuid4().hex local_id3 = uuid.uuid4().hex
local_id4 = uuid.uuid4().hex local_id4 = uuid.uuid4().hex
 End of changes. 1 change blocks. 
0 lines changed or deleted 17 lines changed or added

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