Esempio n. 1
0
    def test_get_file_name_no_file(self):
        request = Request(Environ())
        request.files = {}

        self.assertIsNone(BaseHandler._get_file_name(request))
Esempio n. 2
0
    def test_get_file_name(self):
        request = Request(Environ())
        request.files = {"file": FileStorage(filename="foo")}

        self.assertEqual("foo", BaseHandler._get_file_name(request))