

def test_connection_with_no_endpoint_found(self):
    self.store.configure()
    self.context.service_catalog = [{
        'endpoint_links': [],
        'endpoints': [{
            'region': 'RegionOne',
            'publicURL': 'https://scexample.com',
        }],
        'type': 'object-store',
        'name': 'Object Storage Service',
    }]
    self.store.service_type = 'incorrect-store'
    connection = self.store.get_connection(self.location, context=self.context)
    self.assertIsNone(connection.authurl)
    self.assertEqual(connection.auth_version, '1')
    self.assertIsNone(connection.user)
    self.assertIsNone(connection.tenant_name)
    self.assertIsNone(connection.key)
    self.assertEqual(self.preauthurl, 'https://example.com')
    self.assertEqual(connection.preauthtoken, '0123')
    self.assertEqual(connection.os_options, {
        
    })

dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py TestMultiTenantStoreConnections.test_connection_with_no_endpoint_found/VarMisuse@143/208 `connection`->`self`