def setUp(self):
     self.nsm = rdt.RdfNsManager()
     self.test_equal_values = ("xsd:string",
                               "xsd_string",
                               "XSD:string",
                               "http://www.w3.org/2001/XMLSchema#string",
                               "<http://www.w3.org/2001/XMLSchema#string>",
                               self.nsm.xsd.string)
     self.test_not_eq_values = ("xsd:string",
                                "xsd_strings",
                                "http://www.w3.org/2001/XMLSchema#string",
                                rdt.RdfNsManager().xsd.strings)
     self.test_outputs_test_uri = self.nsm.xsd.string
     self.test_outputs = (('sparql', 'xsd:string'),
                          ('sparql_uri',
                           '<http://www.w3.org/2001/XMLSchema#string>'),
                          ('clean_uri',
                           'http://www.w3.org/2001/XMLSchema#string'),
                          ('pyuri', 'xsd_string'))
     self.test_no_ns_outputs_test_uri = rdt.Uri("http://test.com/test")
     self.test_no_ns_outputs = (('sparql', '<http://test.com/test>'),
                                ('sparql_uri', '<http://test.com/test>'),
                                ('clean_uri', 'http://test.com/test'),
                                ('pyuri',
                                 'pyuri_aHR0cDovL3Rlc3QuY29tLw==_test'))
     self.test_no_ns_inputs = ('<http://test.com/test>',
                               'http://test.com/test',
                               'pyuri_aHR0cDovL3Rlc3QuY29tLw==_test',
                               rdt.Uri('<http://test.com/test>'))
 def test_no_ns_inputs(self):
     first = rdt.Uri(self.test_no_ns_inputs[0])
     for val in self.test_no_ns_inputs:
         self.assertEqual(rdt.Uri(val), first,
                          "\ninput value: %s" % val)
 def test_uri_as_arg_returns_uri(self):
     test_uri = self.nsm.xsd.test
     self.assertEqual(id(test_uri), id(rdt.Uri(test_uri)))
 def test_not_equal_inputs(self):
     self.assertFalse(all(rdt.Uri(x)==rdt.Uri(self.test_not_eq_values[0]) \
                         for x in self.test_not_eq_values))