def testSubScheme(self): for prefix in xrilib.SUBSCHEME_PREFIXES: for input, (ex_r, ex_v) in self.bare_cases: #print "Testing %s%s" % (prefix, input) input = prefix + input r, v = xrilib.is_xri(input, allow_bare=False, detect_subscheme=True, allow_xri_scheme=False) self.assertEqual((r, v), (ex_r, ex_v))
def testXriScheme(self): for input, expected in self.bare_cases: #print "Testing xri://%s" % (input) result = xrilib.is_xri("xri://%s" % input, allow_bare=False, detect_subscheme=False, allow_xri_scheme=True) self.assertEqual(result, expected)
def testBareXri(self): for input, expected in self.bare_cases: result = xrilib.is_xri(input, allow_bare=True, detect_subscheme=False, allow_xri_scheme=False) self.assertEqual(result, expected)