|
|
@ -17,6 +17,7 @@ import flask |
|
|
|
import threading |
|
|
|
import threading |
|
|
|
import unittest |
|
|
|
import unittest |
|
|
|
from werkzeug.test import run_wsgi_app, create_environ |
|
|
|
from werkzeug.test import run_wsgi_app, create_environ |
|
|
|
|
|
|
|
from werkzeug.exceptions import NotFound |
|
|
|
from flask.testsuite import FlaskTestCase |
|
|
|
from flask.testsuite import FlaskTestCase |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -79,6 +80,11 @@ class MemoryTestCase(FlaskTestCase): |
|
|
|
for x in xrange(10): |
|
|
|
for x in xrange(10): |
|
|
|
fire() |
|
|
|
fire() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_safe_join_toplevel_pardir(self): |
|
|
|
|
|
|
|
from flask.helpers import safe_join |
|
|
|
|
|
|
|
with self.assert_raises(NotFound): |
|
|
|
|
|
|
|
safe_join('/foo', '..') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def suite(): |
|
|
|
def suite(): |
|
|
|
suite = unittest.TestSuite() |
|
|
|
suite = unittest.TestSuite() |
|
|
|