def test_and_get_dest(self): path, fname = clitool.check_and_get_dest(self.downloadfile) self.assertEqual(os.getcwd(), path) self.assertEqual(fname, self.downloadfile) with self.assertRaises(FileError): path, fname = clitool.check_and_get_dest(self.uploadfile) with self.assertRaises(FileError): path, fname = clitool.check_and_get_dest('notreal/fakefile')
def test_and_get_no_dest(self): path, fname = clitool.check_and_get_dest(None) self.assertTrue(path and fname)