From 11c66be80e3e249c5f14dd9a23f49a073cd03903 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 23 Dec 2010 14:23:33 +0100 Subject: [PATCH] Added testcase for an issue that may exist on windows --- tests/flask_tests.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/flask_tests.py b/tests/flask_tests.py index 9e68a7a3..c5700ff8 100644 --- a/tests/flask_tests.py +++ b/tests/flask_tests.py @@ -996,6 +996,21 @@ class ModuleTestCase(unittest.TestCase): else: assert 0, 'expected exception' + # testcase for a security issue that may exist on windows systems + import os + import ntpath + old_path = os.path + os.path = ntpath + try: + try: + f('..\\__init__.py') + except NotFound: + pass + else: + assert 0, 'expected exception' + finally: + os.path = old_path + class SendfileTestCase(unittest.TestCase):