"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/core.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).

core.py  (keystone-17.0.0):core.py  (keystone-18.0.0)
skipping to change at line 14 skipping to change at line 14
# not use this file except in compliance with the License. You may obtain # not use this file except in compliance with the License. You may obtain
# a copy of the License at # a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from __future__ import absolute_import
import atexit import atexit
import base64 import base64
import contextlib import contextlib
import datetime import datetime
import functools import functools
import hashlib import hashlib
import json import json
import ldap import ldap
import os import os
import shutil import shutil
skipping to change at line 86 skipping to change at line 84
CONF = keystone.conf.CONF CONF = keystone.conf.CONF
PROVIDERS = provider_api.ProviderAPIs PROVIDERS = provider_api.ProviderAPIs
log.register_options(CONF) log.register_options(CONF)
IN_MEM_DB_CONN_STRING = 'sqlite://' IN_MEM_DB_CONN_STRING = 'sqlite://'
# Strictly matches ISO 8601 timestamps with subsecond precision like: # Strictly matches ISO 8601 timestamps with subsecond precision like:
# 2016-06-28T20:48:56.000000Z # 2016-06-28T20:48:56.000000Z
TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ' TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
TIME_FORMAT_REGEX = '^\d{4}-[0-1]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d{6}Z$' TIME_FORMAT_REGEX = r'^\d{4}-[0-1]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d{6}Z$'
exception._FATAL_EXCEPTION_FORMAT_ERRORS = True exception._FATAL_EXCEPTION_FORMAT_ERRORS = True
os.makedirs(TMPDIR) os.makedirs(TMPDIR)
atexit.register(shutil.rmtree, TMPDIR) atexit.register(shutil.rmtree, TMPDIR)
class dirs(object): class dirs(object):
@staticmethod @staticmethod
def root(*p): def root(*p):
return os.path.join(ROOTDIR, *p) return os.path.join(ROOTDIR, *p)
skipping to change at line 140 skipping to change at line 138
def test_method(*args): def test_method(*args):
... ...
The method test_method would be skipped if caching is disabled globally via The method test_method would be skipped if caching is disabled globally via
the `enabled` option in the `cache` section of the configuration or if the `enabled` option in the `cache` section of the configuration or if
the `caching` option is set to false in either `assignment` or `token` the `caching` option is set to false in either `assignment` or `token`
sections of the configuration. This decorator can be used with no sections of the configuration. This decorator can be used with no
arguments to only check global caching. arguments to only check global caching.
If a specified configuration section does not define the `caching` option, If a specified configuration section does not define the `caching` option,
this decorator makes the same assumption as the `should_cache_fn` in this decorator makes the caching enabled if `enabled` option in the `cache`
keystone.common.cache that caching should be enabled. section of the configuration is true.
""" """
def wrapper(f): def wrapper(f):
@functools.wraps(f) @functools.wraps(f)
def inner(*args, **kwargs): def inner(*args, **kwargs):
if not CONF.cache.enabled: if not CONF.cache.enabled:
raise testcase.TestSkipped('Cache globally disabled.') raise testcase.TestSkipped('Cache globally disabled.')
for s in sections: for s in sections:
conf_sec = getattr(CONF, s, None) conf_sec = getattr(CONF, s, None)
if conf_sec is not None: if conf_sec is not None:
 End of changes. 3 change blocks. 
5 lines changed or deleted 3 lines changed or added

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