Пример #1
0
 def test_tuple_resp(self):
     environ, resp = werkzeug_raw.open(client,
                                       'GET /foo/bar HTTP/1.1',
                                       as_tuple=True)
Пример #2
0
 def test_redirect(self):
     werkzeug_raw.open(client,
                       'GET /redirect HTTP/1.1',
                       follow_redirects=True)
Пример #3
0
 def test_redirect_loop(self):
     with self.assertRaises(werkzeug.test.ClientRedirectError):
         werkzeug_raw.open(client,
                           'GET /redirectloop HTTP/1.1',
                           follow_redirects=True)
Пример #4
0
 def test_valid(self):
     for fn in os.listdir(VALID_DIR):
         with open(os.path.join(VALID_DIR, fn)) as f:
             werkzeug_raw.open(client, f.read())
Пример #5
0
 def test_invalid(self):
     for fn in os.listdir(INVALID_DIR):
         with open(os.path.join(INVALID_DIR, fn)) as f:
             with self.assertRaises(werkzeug_raw.BadRequestSyntax):
                 werkzeug_raw.open(client, f.read())
Пример #6
0
 def test_tuple_resp(self):
     environ, resp = werkzeug_raw.open(client, 'GET /foo/bar HTTP/1.1', as_tuple=True)
Пример #7
0
 def test_redirect_loop(self):
     with self.assertRaises(werkzeug.test.ClientRedirectError):
         werkzeug_raw.open(client, 'GET /redirectloop HTTP/1.1', follow_redirects=True)
Пример #8
0
 def test_redirect(self):
     werkzeug_raw.open(client, 'GET /redirect HTTP/1.1', follow_redirects=True)
Пример #9
0
 def test_invalid(self):
     for fn in os.listdir(INVALID_DIR):
         with open(os.path.join(INVALID_DIR, fn)) as f:
             with self.assertRaises(werkzeug_raw.BadRequestSyntax):
                 werkzeug_raw.open(client, f.read())
Пример #10
0
 def test_valid(self):
     for fn in os.listdir(VALID_DIR):
         with open(os.path.join(VALID_DIR, fn)) as f:
             werkzeug_raw.open(client, f.read())