Skip to content
Myr

test that empty body text responses work

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent c0ae3dd · Browse files · 1 file+7 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−0 removed

  • tests:+7 added−0 removed

1 file+7 added−0 removed

modified:tests/test_requests.py+7 added
911 unmodified lines
912 # and get the same back:913 r2 = requests.get(httpbin('get'), config=dict(keep_alive=False))914 self.assertEqual(r2.headers['Connection'].lower(), 'close')915916 def test_head_content(self):917 """Test that empty bodies are properly supported."""918919 r = requests.head(httpbin('headers'))920 r.content921 r.text922923if __name__ == '__main__':924 unittest.main()