Esempio n. 1
0
 def test__get_checkout_path(self):
     os_api.directory_exists(self.expecetd_checkout_path).and_return(True)
     self.forge.replay()
     c = CheckoutCache(self.root)
     url = "some.url"
     path1 = c.get_checkout_path(url)
     path2 = c.get_checkout_path(url)
     self.assertEquals(path1, path2)
     self.assertEquals(os.path.split(path1)[0], self.expecetd_checkout_path)
Esempio n. 2
0
 def test__dont_create_if_not_exists(self):
     os_api.directory_exists(self.expecetd_checkout_path).and_return(True)
     self.forge.replay()
     c = CheckoutCache(self.root)
Esempio n. 3
0
 def test__creates_if_not_exists(self):
     os_api.directory_exists(self.expecetd_checkout_path).and_return(False)
     os_api.makedirs(self.expecetd_checkout_path)
     self.forge.replay()
     c = CheckoutCache(self.root)