def jobCs(no: int, url: str): switcher = { 0: code.isRedirectingToOtherDomain(url), 1: code.isUsingManyExternalResources(url), 2: code.isOpenningNewWindow(url), 3: code.isBlockingRightClick(url), 4: code.isUsingInceptionBar(url) } cFeatures[no] = switcher.get(no)
def testGooGl(self): self.assertEqual(code.isRedirectingToOtherDomain('https://goo.gl'), 1)
def testGoogle(self): self.assertEqual(code.isRedirectingToOtherDomain('https://google.com'), 0)