Skip to content
Myr

Add tests for settings

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

authored by Johannes Gorset · committed by Johannes Gorset · parent ec5f227 · Browse files · 1 file+10 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+10 added−0 removed

  • other:+10 added−0 removed

1 file+10 added−0 removed

modified:test_requests.py+10 added
153 unmodified lines
154 conv_auth = ('requeststest', 'bad_password')155156 r = requests.get('https://convore.com/api/account/verify.json', auth=conv_auth)157 self.assertEquals(r.status_code, 401)158 159 def test_settings(self):160 import urllib2161 162 with requests.settings(timeout=0):163 self.assertRaises(urllib2.URLError, requests.get, 'http://google.com')164 165 with requests.settings(timeout=10):166 requests.get('http://google.com')167 168169170if __name__ == '__main__':171 unittest.main()