test: choose a random free port for tests using the HTTP server

Closes #1392.
This commit is contained in:
James Lu 2019-12-15 11:18:09 -08:00 committed by Valentin Lorentz
parent 8491d0b944
commit a6392c8582

View File

@ -229,6 +229,8 @@ class PluginTestCase(SupyTestCase):
conf.supybot.reply.whenAddressedBy.chars.setValue('@') conf.supybot.reply.whenAddressedBy.chars.setValue('@')
conf.supybot.reply.error.detailed.setValue(True) conf.supybot.reply.error.detailed.setValue(True)
conf.supybot.reply.whenNotCommand.setValue(True) conf.supybot.reply.whenNotCommand.setValue(True)
# Choose a random port for tests using the HTTP server
conf.supybot.servers.http.port.setValue(0)
self.myVerbose = world.myVerbose self.myVerbose = world.myVerbose
def rmFiles(dir): def rmFiles(dir):
for filename in os.listdir(dir): for filename in os.listdir(dir):