Commit 61ed4979 authored by Lorenz Steinert's avatar Lorenz Steinert

added testing for relpath

parent b6f498ee
......@@ -276,10 +276,14 @@ class GetFuncTest(unittest.TestCase):
"""test the get_share function"""
self.assertEqual(esme.get_share("", self.config),
'/tmp/python3-esme-testing/share')
self.assertEqual(os.path.abspath(esme.get_share("/tmp/python3-esme-testing/share")),
self.assertEqual(esme.get_share("/tmp/python3-esme-testing/share"),
'/tmp/python3-esme-testing/share')
self.assertEqual(os.path.abspath(esme.get_share("", self.config,
'/tmp/python3-esme-testing/share')),
self.assertEqual(esme.get_share("", self.config,
'/tmp/python3-esme-testing/share'),
'/tmp/python3-esme-testing/share')
self.config['PROTOKOLL']['share'] = './share'
self.assertEqual(esme.get_share("/tmp/python3-esme-testing/share",
self.config),
'/tmp/python3-esme-testing/share')
self.assertEqual(self.info, [])
self.assertEqual(self.warning, [])
......@@ -288,10 +292,14 @@ class GetFuncTest(unittest.TestCase):
"""test the get_path function"""
self.assertEqual(esme.get_path("", self.config),
'/tmp/python3-esme-testing')
self.assertEqual(os.path.abspath(esme.get_path("/tmp/python3-esme-testing/etc/test")),
self.assertEqual(esme.get_path("/tmp/python3-esme-testing/etc/test"),
'/tmp/python3-esme-testing')
self.assertEqual(esme.get_path("", self.config,
'/tmp/python3-esme-testing'),
'/tmp/python3-esme-testing')
self.assertEqual(os.path.abspath(esme.get_path("", self.config,
'/tmp/python3-esme-testing')),
self.config['PROTOKOLL']['share'] = '.'
self.assertEqual(esme.get_path("/tmp/python3-esme-testing/etc",
self.config),
'/tmp/python3-esme-testing')
self.assertEqual(self.info, [])
self.assertEqual(self.warning, [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment