Пример #1
0
    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')
Пример #2
0
    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')
Пример #3
0
 def test_and_get_no_dest(self):
     path, fname = clitool.check_and_get_dest(None)
     self.assertTrue(path and fname)
Пример #4
0
 def test_and_get_no_dest(self):
     path, fname = clitool.check_and_get_dest(None)
     self.assertTrue(path and fname)