def testExtractUrlFiltered(self): dep = { 'url': 'https://chromium.googlesource.com/chromium/src', 'condition': 'checkout_google_internal', } self.assertIsNone(deps_utils.ExtractUrl(dep))
def testExtractUrlDictSansUrl(self): dep = { 'condition': 'always', } with self.assertRaises(KeyError): deps_utils.ExtractUrl(dep)
def testExtractUrlNested(self): dep = { 'url': 'https://chromium.googlesource.com/chromium/src', 'condition': 'always', } return deps_utils.ExtractUrl(dep)
def testExtractUrlWeirdType(self): dep = 1732 with self.assertRaises(Exception): deps_utils.ExtractUrl(dep)
def testExtractUrlSimple(self): dep = 'https://chromium.googlesource.com/chromium/src' return deps_utils.ExtractUrl(dep)