From 354ac7ecaddc3158e8594ab8d8dc6991ff275c47 Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Mon, 12 Dec 2016 08:36:22 -0700 Subject: [PATCH] squash 3xx tests into super tests --- tests/test_requests.py | 53 ------------------------------------------ 1 file changed, 53 deletions(-) diff --git a/tests/test_requests.py b/tests/test_requests.py index c76c8417..336f68dc 100755 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -225,31 +225,6 @@ class TestRequests: else: pytest.fail('Expected custom max number of redirects to be respected but was not') - def test_http_301_changes_post_to_get(self, httpbin): - r = requests.post(httpbin('status', '301')) - assert r.status_code == 200 - assert r.request.method == 'GET' - assert r.history[0].status_code == 301 - assert r.history[0].is_redirect - - def test_http_301_doesnt_change_head_to_get(self, httpbin): - r = requests.head(httpbin('status', '301'), allow_redirects=True) - assert r.status_code == 200 - assert r.request.method == 'HEAD' - assert r.history[0].status_code == 301 - assert r.history[0].is_redirect - - def test_http_301_doesnt_change_non_post_to_get(self, httpbin): - r = requests.patch(httpbin('redirect-to'), - data='test body', - params={'url': 'patch', 'status_code': '301'}) - assert r.status_code == 200 - assert r.request.method == 'PATCH' - assert r.history[0].status_code == 301 - assert r.history[0].is_redirect - assert r.request.body == 'test body' - assert r.json()['data'] == 'test body' - @pytest.mark.parametrize( 'method, body, expected', ( ('GET', None, 'GET'), @@ -280,20 +255,6 @@ class TestRequests: else: assert r.json()['data'] == body - def test_http_302_changes_post_to_get(self, httpbin): - r = requests.post(httpbin('status', '302')) - assert r.status_code == 200 - assert r.request.method == 'GET' - assert r.history[0].status_code == 302 - assert r.history[0].is_redirect - - def test_http_302_doesnt_change_head_to_get(self, httpbin): - r = requests.head(httpbin('status', '302'), allow_redirects=True) - assert r.status_code == 200 - assert r.request.method == 'HEAD' - assert r.history[0].status_code == 302 - assert r.history[0].is_redirect - @pytest.mark.parametrize( 'method, body, expected', ( ('GET', None, 'GET'), @@ -324,20 +285,6 @@ class TestRequests: else: assert r.json()['data'] == body - def test_http_303_changes_post_to_get(self, httpbin): - r = requests.post(httpbin('status', '303')) - assert r.status_code == 200 - assert r.request.method == 'GET' - assert r.history[0].status_code == 303 - assert r.history[0].is_redirect - - def test_http_303_doesnt_change_head_to_get(self, httpbin): - r = requests.head(httpbin('status', '303'), allow_redirects=True) - assert r.status_code == 200 - assert r.request.method == 'HEAD' - assert r.history[0].status_code == 303 - assert r.history[0].is_redirect - @pytest.mark.parametrize( 'method, body, expected', ( ('GET', None, 'GET'),