def test_get_temp_directory(self, mock_tempfile): instance = BaseVCS('git+/foo/bar') path = instance.get_temp_directory() mock_tempfile.return_value = '/tmp/bar' mock_tempfile.assert_called_with(suffix='facio') self.assertEqual(path, instance.get_temp_directory())
def test_rm_temp_dir(self): instance = BaseVCS('git+/foo/bar') d = instance.get_temp_directory() instance.remove_tmp_dir(d, '/foo/bar') self.assertFalse(os.path.isdir(d))