Beispiel #1
0
    def test_get_auth_uri_from_auth_params(self):
        self.override_auth_config('auth_host', 'eggs')
        self.override_auth_config('auth_port', 12345)
        self.override_auth_config('auth_protocol', 'http')
        self.assertEqual('http://eggs:12345/v3', context._get_auth_uri())

        self.override_config('use_identity_api_v3', False)
        self.assertEqual('http://eggs:12345/v2.0', context._get_auth_uri())
Beispiel #2
0
    def test_get_auth_uri_from_auth_params(self):
        self.override_auth_config('auth_host', 'eggs')
        self.override_auth_config('auth_port', 12345)
        self.override_auth_config('auth_protocol', 'http')
        self.assertEqual('http://eggs:12345/v3', context._get_auth_uri())

        self.override_config('use_identity_api_v3', False)
        self.assertEqual('http://eggs:12345/v2.0', context._get_auth_uri())
Beispiel #3
0
    def test_get_auth_uri_from_identity_uri(self):
        self.override_auth_config('identity_uri', 'http://spam:35357')
        self.assertEqual('http://spam:35357/v3', context._get_auth_uri())

        self.override_config('use_identity_api_v3', False)
        self.assertEqual('http://spam:35357/v2.0', context._get_auth_uri())
Beispiel #4
0
 def test_get_auth_url_from_auth_uri_param(self):
     self.override_auth_config('auth_uri', 'http://pony:5000/v2.0')
     self.assertEqual('http://pony:5000/v2.0', context._get_auth_uri())
Beispiel #5
0
    def test_get_auth_uri_from_identity_uri(self):
        self.override_auth_config('identity_uri', 'http://spam:35357')
        self.assertEqual('http://spam:35357/v3', context._get_auth_uri())

        self.override_config('use_identity_api_v3', False)
        self.assertEqual('http://spam:35357/v2.0', context._get_auth_uri())
Beispiel #6
0
 def test_get_auth_url_from_auth_uri_param(self):
     self.override_auth_config('auth_uri', 'http://pony:5000/v2.0')
     self.assertEqual('http://pony:5000/v2.0', context._get_auth_uri())