Allow restarting the reactor for multiple tests.

This commit is contained in:
Ralph Bean
2016-12-15 12:18:51 -05:00
committed by Matt Prahl
parent b2cf02080d
commit 29747a7ea7

View File

@@ -185,6 +185,12 @@ class TestBuild(unittest.TestCase):
conf.set_item("system", "koji")
TestModuleBuilder.reset()
# Necessary to restart the twisted reactor for the next test.
import sys
del sys.modules['twisted.internet.reactor']
del sys.modules['moksha.hub.reactor']
import moksha.hub.reactor
@timed(30)
@patch('module_build_service.auth.get_username', return_value='Homer J. Simpson')
@patch('module_build_service.auth.assert_is_packager')