Skip to content

Commit

Permalink
unconditionally deregister adapters in tearDown
Browse files Browse the repository at this point in the history
This also fixes test_unacceptable_charset which was
leaving an adapter registered
  • Loading branch information
Brian Sutherland committed Apr 9, 2013
1 parent f54d228 commit 5f40714
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/zope/publisher/tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ def __call__(self, a, b):
self.app.folder.item = Item()
self.app.xxx = Item()

def tearDown(self):
# unregister adapters registered in tests
from zope.component.testing import tearDown
tearDown()

def _createRequest(self, extra_env={}, body=b""):
env = self._testEnv.copy()
env.update(extra_env)
Expand Down Expand Up @@ -442,9 +447,6 @@ def testRequestLocale(self):
eq(locale.id.territory, None)
eq(locale.id.variant, None)

from zope.component.testing import tearDown
tearDown()

def testCookies(self):
cookies = {
'HTTP_COOKIE':
Expand Down

0 comments on commit 5f40714

Please sign in to comment.