Esempio n. 1
0
 def test_tuple_resp(self):
     environ, resp = werkzeug_raw.open(client,
                                       'GET /foo/bar HTTP/1.1',
                                       as_tuple=True)
Esempio n. 2
0
 def test_redirect(self):
     werkzeug_raw.open(client,
                       'GET /redirect HTTP/1.1',
                       follow_redirects=True)
Esempio n. 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)
Esempio n. 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())
Esempio n. 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())
Esempio n. 6
0
 def test_tuple_resp(self):
     environ, resp = werkzeug_raw.open(client, 'GET /foo/bar HTTP/1.1', as_tuple=True)
Esempio n. 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)
Esempio n. 8
0
 def test_redirect(self):
     werkzeug_raw.open(client, 'GET /redirect HTTP/1.1', follow_redirects=True)
Esempio n. 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())
Esempio n. 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())