Skip to content

Commit

Permalink
- reset global variables changed in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Feb 25, 2020
1 parent 52d5fce commit 8dd78a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ZPublisher/tests/test_WSGIPublisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ def test_set_REMOTE_USER_environ(self):

def test_webdav_source_port(self):
from ZPublisher import WSGIPublisher
old_webdav_source_port = WSGIPublisher._WEBDAV_SOURCE_PORT
start_response = DummyCallable()
_response = DummyResponse()
_publish = DummyCallable()
Expand Down Expand Up @@ -826,6 +827,9 @@ def test_webdav_source_port(self):
self.assertTrue(environ['WEBDAV_SOURCE_PORT'])
self.assertEqual(environ['PATH_INFO'], '/test/manage_DAVget')

# Clean up
WSGIPublisher.set_webdav_source_port(old_webdav_source_port)


class ExcViewCreatedTests(ZopeTestCase):

Expand Down
3 changes: 3 additions & 0 deletions src/Zope2/Startup/tests/test_starter.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def test_webdav_source_port(self):
starter.setupPublisher()
self.assertEqual(WSGIPublisher._WEBDAV_SOURCE_PORT, 9800)

# Cleanup
WSGIPublisher.set_webdav_source_port(0)

@unittest.skipUnless(six.PY2, 'Python 2 specific checkinterval test.')
def testConfigureInterpreter(self):
oldcheckinterval = sys.getcheckinterval()
Expand Down

0 comments on commit 8dd78a1

Please sign in to comment.