def testBadIp(self, prefix): uc = UpgradeCheck("test", url="200.200.200.200", version="%s%s" % (prefix, omero_version)) uc.run() assert uc.isUpgradeNeeded() is False assert uc.isExceptionThrown() is True
def testBadUrl(self, url): uc = UpgradeCheck("test", url=url, version="XYZ" + omero_version) uc.run() assert uc.isUpgradeNeeded() is False assert uc.isExceptionThrown() is True
def testNoActionOnEmpty(self): uc = UpgradeCheck("test", url="") uc.run() assert uc.isUpgradeNeeded() is False assert uc.isExceptionThrown() is False
def testSlowResponse(self, port): uc = UpgradeCheck("test", url="http://127.0.0.1:%s" % port) uc.run() assert uc.isUpgradeNeeded() is False assert uc.isExceptionThrown() is True
def testReal(self): uc = UpgradeCheck("test", version="test") uc.run() assert uc.isUpgradeNeeded() is True assert uc.isExceptionThrown() is False
def testNoActionOnNull(self): uc = UpgradeCheck("test", url=None) uc.run() assert uc.isUpgradeNeeded() is False assert uc.isExceptionThrown() is True