Properly remove monkeypatching in radicale tests

This commit is contained in:
Markus Unterwaditzer 2014-08-21 00:56:13 +02:00
parent b909d525f8
commit 63c990a320

View file

@ -8,8 +8,6 @@ import pytest
import wsgi_intercept import wsgi_intercept
import wsgi_intercept.requests_intercept import wsgi_intercept.requests_intercept
wsgi_intercept.requests_intercept.install()
RADICALE_SCHEMA = ''' RADICALE_SCHEMA = '''
create table collection ( create table collection (
@ -93,10 +91,12 @@ class ServerMixin(object):
do_the_radicale_dance(str(tmpdir)) do_the_radicale_dance(str(tmpdir))
from radicale import Application from radicale import Application
wsgi_intercept.requests_intercept.install()
wsgi_intercept.add_wsgi_intercept('127.0.0.1', 80, Application) wsgi_intercept.add_wsgi_intercept('127.0.0.1', 80, Application)
def teardown(): def teardown():
wsgi_intercept.remove_wsgi_intercept('127.0.0.1', 80) wsgi_intercept.remove_wsgi_intercept('127.0.0.1', 80)
wsgi_intercept.requests_intercept.uninstall()
request.addfinalizer(teardown) request.addfinalizer(teardown)
def get_storage_args(self, collection='test'): def get_storage_args(self, collection='test'):