mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
Get rid of six and fix str/unicode types regression that became active on Python 3. (#4533)
This was introduced in d38ca803c5.
This commit is contained in:
committed by
Arik Fraimovich
parent
afe8c95f4d
commit
a7ef3ad72a
@@ -1,8 +1,7 @@
|
||||
import importlib
|
||||
import os
|
||||
import time
|
||||
|
||||
from six.moves import reload_module
|
||||
|
||||
from flask import request
|
||||
from mock import patch
|
||||
from redash import models, settings
|
||||
@@ -328,11 +327,11 @@ class TestRemoteUserAuth(BaseTestCase):
|
||||
variables = self.DEFAULT_SETTING_OVERRIDES.copy()
|
||||
variables.update(overrides or {})
|
||||
with patch.dict(os.environ, variables):
|
||||
reload_module(settings)
|
||||
importlib.reload(settings)
|
||||
|
||||
# Queue a cleanup routine that reloads the settings without overrides
|
||||
# once the test ends
|
||||
self.addCleanup(lambda: reload_module(settings))
|
||||
self.addCleanup(lambda: importlib.reload(settings))
|
||||
|
||||
def assert_correct_user_attributes(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user