Revision fbdac0d9 test/ganeti.utils.io_unittest.py
b/test/ganeti.utils.io_unittest.py | ||
---|---|---|
646 | 646 |
class TestIsBelowDir(unittest.TestCase): |
647 | 647 |
"""Testing case for IsBelowDir""" |
648 | 648 |
|
649 |
def testExactlyTheSame(self): |
|
650 |
self.assertFalse(utils.IsBelowDir("/a/b", "/a/b")) |
|
651 |
self.assertFalse(utils.IsBelowDir("/a/b", "/a/b/")) |
|
652 |
self.assertFalse(utils.IsBelowDir("/a/b/", "/a/b")) |
|
653 |
self.assertFalse(utils.IsBelowDir("/a/b/", "/a/b/")) |
|
654 |
|
|
649 | 655 |
def testSamePrefix(self): |
650 | 656 |
self.assertTrue(utils.IsBelowDir("/a/b", "/a/b/c")) |
651 | 657 |
self.assertTrue(utils.IsBelowDir("/a/b/", "/a/b/e")) |
Also available in: Unified diff