def test_get_file_name_no_file(self): request = Request(Environ()) request.files = {} self.assertIsNone(BaseHandler._get_file_name(request))
def test_get_file_name(self): request = Request(Environ()) request.files = {"file": FileStorage(filename="foo")} self.assertEqual("foo", BaseHandler._get_file_name(request))