keystone/keystone/tests/unit/token/test_common.py
XieYingYun 29eec5ebc0 Remove unnecessary setUp function in testcase
In testcase, setUp will be called automatically. This patch used to
remove setUp functions that do nothing. Besides, it will keep code clean.

Change-Id: Iadb247fd43df8bb9bb0db54492b1bc2dc23cf065
2017-03-30 14:32:58 +08:00

23 lines
838 B
Python

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from six.moves import urllib
from keystone.tests import unit
from keystone.token.providers import common
class TestTokenProvidersCommon(unit.TestCase):
def test_strings_are_url_safe(self):
s = common.random_urlsafe_str()
self.assertEqual(s, urllib.parse.quote_plus(s))