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

Server/Tests: Use deepcopy to clone config

Fixes wrong references in embedded (dict in dict) class variables
outside the class variable definition context, for redefined
inherited class variables.
parent 0aa419c4
Branches
Tags
No related merge requests found
...@@ -7,6 +7,7 @@ import getpass ...@@ -7,6 +7,7 @@ import getpass
import sys import sys
import warnings import warnings
from os import path from os import path
from copy import deepcopy
import unittest2 as unittest import unittest2 as unittest
import MySQLdb as my import MySQLdb as my
from warden_server import build_server from warden_server import build_server
...@@ -240,14 +241,14 @@ class Warden3ServerTest(unittest.TestCase): ...@@ -240,14 +241,14 @@ class Warden3ServerTest(unittest.TestCase):
class X509AuthenticatorTest(Warden3ServerTest): class X509AuthenticatorTest(Warden3ServerTest):
"""Performs the basic test suite using the X509Authenticator""" """Performs the basic test suite using the X509Authenticator"""
config = dict(Warden3ServerTest.config) config = deepcopy(Warden3ServerTest.config)
config['auth']['type'] = 'X509Authenticator' config['auth']['type'] = 'X509Authenticator'
app = build_server(config) app = build_server(config)
class X509NameAuthenticatorTest(Warden3ServerTest): class X509NameAuthenticatorTest(Warden3ServerTest):
"""Performs the basic test suite using the X509NameAuthenticator""" """Performs the basic test suite using the X509NameAuthenticator"""
config = dict(Warden3ServerTest.config) config = deepcopy(Warden3ServerTest.config)
config['auth']['type'] = 'X509NameAuthenticator' config['auth']['type'] = 'X509NameAuthenticator'
app = build_server(config) app = build_server(config)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment