Skip to content
Snippets Groups Projects
Commit 51e080ce authored by Radko Krkoš's avatar Radko Krkoš
Browse files

Server/Tests: Centralize Server instance creation

parent 4f7ea2fb
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,6 @@ class Warden3ServerTest(unittest.TestCase):
"""High level Warden3 Server tests"""
config = {'log': {'level': 'debug'}, 'validator': {'type': 'NoValidator'}, 'auth': {'type': 'PlainAuthenticator'},
'db': {'user': USER, 'password': PASSWORD, 'dbname': DB}, 'handler': {'description': 'Warden Test Server'}}
app = build_server(config)
getInfo_interface_tests_specific = [
("/getInfo", "403 I'm watching. Authenticate."),
......@@ -139,6 +138,7 @@ class Warden3ServerTest(unittest.TestCase):
def setUpClass(cls):
"""Pre-test cleanup"""
cls.clean_lastid()
cls.app = build_server(cls.config)
@classmethod
def clean_lastid(cls):
......@@ -243,14 +243,12 @@ class X509AuthenticatorTest(Warden3ServerTest):
"""Performs the basic test suite using the X509Authenticator"""
config = deepcopy(Warden3ServerTest.config)
config['auth']['type'] = 'X509Authenticator'
app = build_server(config)
class X509NameAuthenticatorTest(Warden3ServerTest):
"""Performs the basic test suite using the X509NameAuthenticator"""
config = deepcopy(Warden3ServerTest.config)
config['auth']['type'] = 'X509NameAuthenticator'
app = build_server(config)
getInfo_interface_tests_specific = [
("/getInfo", "200 OK"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment