Fix stealth test, add legacy v2 onion test

This commit is contained in:
Miguel Jacq 2018-10-17 09:23:07 +11:00
parent fea34c0f34
commit dbbc9c0c82
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
4 changed files with 34 additions and 5 deletions

View file

@ -158,9 +158,7 @@ class TorGuiBaseTest(GuiBaseTest):
def copy_have_hidserv_auth_button(self, mode):
'''Test that the Copy HidservAuth button is shown'''
self.assertTrue(mode.server_status.copy_hidservauth_button.isVisible())
clipboard = self.gui.qtapp.clipboard()
self.assertRegex(clipboard.text(), r'HidServAuth %s [a-zA-Z1-9]' % self.gui.app.onion_host)
def hidserv_auth_string(self):
'''Test the validity of the HidservAuth string'''
self.assertRegex(self.gui.app.auth_string, r'HidServAuth %s [a-zA-Z1-9]' % self.gui.app.onion_host)
self.assertRegex(self.gui.app.auth_string, r'HidServAuth {} [a-zA-Z1-9]'.format(self.gui.app.onion_host))