Beispiel #1
0
	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))
Beispiel #2
0
	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)
Beispiel #3
0
	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)