def reload_settings(self):
"""
Reload settings module with cleanup to restore it.
Returns:
dict: dictionary of the newly reloaded settings ``vars``
"""
importlib.reload(sys.modules['sga_lti.settings'])
# Restore settings to original settings after test
self.addCleanup(importlib.reload, sys.modules['sga_lti.settings'])
return vars(sys.modules['sga_lti.settings'])
评论列表
文章目录