(self, httpbin)
| 816 | assert '"auth"' in r.request.headers["Authorization"] |
| 817 | |
| 818 | def test_POSTBIN_GET_POST_FILES(self, httpbin): |
| 819 | url = httpbin("post") |
| 820 | requests.post(url).raise_for_status() |
| 821 | |
| 822 | post1 = requests.post(url, data={"some": "data"}) |
| 823 | assert post1.status_code == 200 |
| 824 | |
| 825 | with open("requirements-dev.txt") as f: |
| 826 | post2 = requests.post(url, files={"some": f}) |
| 827 | assert post2.status_code == 200 |
| 828 | |
| 829 | post4 = requests.post(url, data='[{"some": "json"}]') |
| 830 | assert post4.status_code == 200 |
| 831 | |
| 832 | with pytest.raises(ValueError): |
| 833 | requests.post(url, files=["bad file data"]) |
| 834 | |
| 835 | def test_invalid_files_input(self, httpbin): |
| 836 | url = httpbin("post") |
nothing calls this directly
no test coverage detected