示例#1
0
 def on_accepted(self):
     settings = self.page_3.get_settings()
     msg = QMessageBox()
     msg.setIcon(QMessageBox.Warning)
     msg.setWindowTitle(APP_NAME)
     msg.setStandardButtons(QMessageBox.Ok)
     if not settings['nickname']:
         msg.setText("Please enter a name.")
         msg.exec_()
     elif not settings['introducer']:
         msg.setText("Please enter an Introducer fURL.")
         msg.exec_()
     elif not is_valid_furl(settings['introducer']):
         msg.setText("Please enter a valid Introducer fURL.")
         msg.exec_()
     else:
         self.setCurrentIndex(1)
         self.verify_settings(settings, from_wormhole=False)
示例#2
0
def test_is_valid_furl_tub_id_not_base32():
    assert not is_valid_furl('pb://[email protected]:12345/introducer')
示例#3
0
def test_is_valid_furl_invalid_char_in_connection_hint():
    assert not is_valid_furl('pb://abc234@exam/ple.org:12345/introducer')
示例#4
0
def test_is_valid_furl_no_host_separator():
    assert not is_valid_furl('pb://abc234example.org:12345/introducer')
示例#5
0
def test_is_valid_furl_no_port():
    assert not is_valid_furl('pb://[email protected]/introducer')
示例#6
0
def test_is_valid_furl():
    assert is_valid_furl('pb://[email protected]:12345/introducer')