Extract the config provider into its own sub-module
This commit is contained in:
parent
15963fe18c
commit
88a04441de
10 changed files with 230 additions and 212 deletions
|
@ -1,7 +1,7 @@
|
|||
from test.test_api_usage import ApiTestCase, READ_ACCESS_USER, ADMIN_ACCESS_USER
|
||||
from endpoints.api.suconfig import (SuperUserRegistryStatus, SuperUserConfig, SuperUserConfigFile,
|
||||
SuperUserCreateInitialSuperUser, SuperUserConfigValidate)
|
||||
from app import CONFIG_PROVIDER
|
||||
from app import config_provider
|
||||
from data.database import User
|
||||
|
||||
import unittest
|
||||
|
@ -10,11 +10,11 @@ import unittest
|
|||
class ConfigForTesting(object):
|
||||
|
||||
def __enter__(self):
|
||||
CONFIG_PROVIDER.reset_for_test()
|
||||
return CONFIG_PROVIDER
|
||||
config_provider.reset_for_test()
|
||||
return config_provider
|
||||
|
||||
def __exit__(self, type, value, traceback):
|
||||
CONFIG_PROVIDER.reset_for_test()
|
||||
config_provider.reset_for_test()
|
||||
|
||||
|
||||
class TestSuperUserRegistryStatus(ApiTestCase):
|
||||
|
|
Reference in a new issue