Ejemplo n.º 1
0
class TestUtilUri(unittest.TestCase):

    def setUp(self):
        unittest.TestCase.setUp(self)
        self.rootUri = Uri('WT://Testexport1.Testservice/')
        self.subUri = Uri('WT://Testexport1.Testservice/something')

    def testCreateUri(self):
        self.rootUri = Uri('WT://Testexport1.Testservice/')
        self.subUri = Uri('WT://Testexport1.Testservice/something')

    def testGetExportIdentifier(self):
        self.assertEqual(self.rootUri.exportIdentifier, 'Testexport1.Testservice',
                          'Exportidentifier was not found correctly')

    def testGetPath(self):
        self.assertEqual(self.rootUri.path, '/', 'Path was not found correctly')

    def testAppend(self):
        self.assertEqual(self.rootUri.append('something').string, self.subUri.string, 'Append did not work')

    def testContains(self):
        self.assertTrue(self.rootUri.contains(self.subUri))
        self.assertFalse(self.subUri.contains(self.rootUri))

    def testGetNextItem(self):
        self.assertEqual(self.subUri.getNextItem(self.rootUri), 'something')
Ejemplo n.º 2
0
 def testCreateUri(self):
     self.rootUri = Uri('WT://Testexport1.Testservice/')
     self.subUri = Uri('WT://Testexport1.Testservice/something')
Ejemplo n.º 3
0
 def setUp(self):
     unittest.TestCase.setUp(self)
     self.rootUri = Uri('WT://Testexport1.Testservice/')
     self.subUri = Uri('WT://Testexport1.Testservice/something')