def __init__(self): ''' Create and display the connection window. ''' super(ConnectionWindow, self).__init__("BIAFlows Connection") self.biaflows = BIAFlows.getInstance() self.createAndShowGUI() self.addWindowListener(self) WindowManager.addWindow(self)
def testGetInstance(self): newInst = BIAFlows.getInstance() existingInst = BIAFlows.getInstance() self.assertEquals(newInst, existingInst) self.assertEquals(existingInst.getHost(), 'https://biaflows.neubias.org')
def testGetUploadURL(self): biaflows = BIAFlows.getInstance() url = biaflows.getUploadURL() self.assertEquals(url.find('-upload')>=0, True)
def testSetPrivateKey(self): biaflows = BIAFlows.getInstance() biaflows.setPrivateKey("k2k2k2"); self.assertEquals(BIAFlows.getInstance().getPrivateKey(), 'k2k2k2')
def testGetPrivateKey(self): self.assertEquals(BIAFlows.getInstance().getPrivateKey(), '73b7df42-3484-4c1b-9bf2-8d9e3ea53eac')
def testSetPublicKey(self): biaflows = BIAFlows.getInstance() biaflows.setPublicKey("k1k1k1"); self.assertEquals(BIAFlows.getInstance().getPublicKey(), 'k1k1k1')
def testGetPublicKey(self): self.assertEquals(BIAFlows.getInstance().getPublicKey(), 'c0f3be78-a1a7-4d86-ad09-9e1753f26a8b')