hbmartin commited on
Commit
36d4556
·
1 Parent(s): cd0bfbf

request tests fixes

Browse files
Files changed (1) hide show
  1. tests/test_request.py +3 -3
tests/test_request.py CHANGED
@@ -17,7 +17,7 @@ def test_get_streaming(mock_urlopen):
17
  response = mock.Mock()
18
  response.read.side_effect = fake_stream_binary
19
  mock_urlopen.return_value = response
20
- response = request.get('fakeassurl.gov', streaming=True)
21
  call_count = 0
22
  for i in response:
23
  call_count += 1
@@ -29,7 +29,7 @@ def test_get_headers(mock_urlopen):
29
  response = mock.Mock()
30
  response.info.return_value = {'content-length': '16384'}
31
  mock_urlopen.return_value = response
32
- response = request.get('fakeassurl.gov', headers=True)
33
  assert response == {'content-length': '16384'}
34
 
35
 
@@ -38,5 +38,5 @@ def test_get(mock_urlopen):
38
  response = mock.Mock()
39
  response.read.return_value = '<html></html>'.encode('utf-8')
40
  mock_urlopen.return_value = response
41
- response = request.get('fakeassurl.gov')
42
  assert response == '<html></html>'
 
17
  response = mock.Mock()
18
  response.read.side_effect = fake_stream_binary
19
  mock_urlopen.return_value = response
20
+ response = request.get('http://fakeassurl.gov', streaming=True)
21
  call_count = 0
22
  for i in response:
23
  call_count += 1
 
29
  response = mock.Mock()
30
  response.info.return_value = {'content-length': '16384'}
31
  mock_urlopen.return_value = response
32
+ response = request.get('http://fakeassurl.gov', headers=True)
33
  assert response == {'content-length': '16384'}
34
 
35
 
 
38
  response = mock.Mock()
39
  response.read.return_value = '<html></html>'.encode('utf-8')
40
  mock_urlopen.return_value = response
41
+ response = request.get('http://fakeassurl.gov')
42
  assert response == '<html></html>'