This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/test/test_suconfig_api.py
Sam Chow d9f7c07f42 Add db configuration to modifying config
Move more tests over
2018-08-21 15:19:24 -04:00

25 lines
635 B
Python

from test.test_api_usage import ApiTestCase
from endpoints.api.suconfig import SuperUserRegistryStatus
from app import config_provider
import unittest
class FreshConfigProvider(object):
def __enter__(self):
config_provider.reset_for_test()
return config_provider
def __exit__(self, type, value, traceback):
config_provider.reset_for_test()
class TestSuperUserRegistryStatus(ApiTestCase):
def test_registry_status(self):
with FreshConfigProvider():
json = self.getJsonResponse(SuperUserRegistryStatus)
self.assertEquals('config-db', json['status'])
if __name__ == '__main__':
unittest.main()