Beispiel #1
0
 def test_cache_path(self):
     self.maxDiff = 1200
     for obj, path in self.fixture:
         with self.subTest(path=path):
             rv = cache(path, obj)
             check = split_to_path(rv, root=self.drcty.name)
             self.assertEqual(path, check, check)
             self.assertTrue(os.path.isfile(rv))
Beispiel #2
0
 def test_vm(self):
     expect = Path(
         self.drcty.name,
         "project", "org", "catalogs", "catalog", "template", "vm",
         "vm.yaml"
     )
     data = os.path.join(*(i for i in expect if not i is None))
     rv = split_to_path(data, expect.root)
     self.assertEqual(expect[1:], rv[1:])
     self.assertTrue(os.path.samefile(expect[0], rv[0]))
Beispiel #3
0
 def test_vapp(self):
     expect = Path(
         self.drcty.name,
         "project", "org", "vdc", "vapps", "vapp", None,
         "vapp.yaml"
     )
     data = os.path.join(*(i for i in expect if not i is None))
     rv = split_to_path(data, expect.root)
     self.assertEqual(expect[1:], rv[1:])
     self.assertTrue(os.path.samefile(expect[0], rv[0]))