Pass --local-only down to the ServerStatus and Mode so that we can set shorter timeouts for local GUI tests. Update the tests to use a very short timeout

This commit is contained in:
Miguel Jacq 2018-09-27 15:43:59 +10:00
parent 2a7adb2365
commit 201f351279
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
5 changed files with 29 additions and 16 deletions

View file

@ -203,9 +203,9 @@ class CommonTests(object):
self.assertEquals(self.gui.share_mode.server_status_label.text(), strings._('closing_automatically', True))
# Auto-stop timer tests
def test_set_timeout(self, mode):
def test_set_timeout(self, mode, timeout):
'''Test that the timeout can be set'''
timer = QtCore.QDateTime.currentDateTime().addSecs(120)
timer = QtCore.QDateTime.currentDateTime().addSecs(timeout)
if mode == 'receive':
self.gui.receive_mode.server_status.shutdown_timeout.setDateTime(timer)
self.assertTrue(self.gui.receive_mode.server_status.shutdown_timeout.dateTime(), timer)