Esempio n. 1
0
 def test_call_with_user_agent(self):
     s = HttpService('host', 42, 'path', user_agent='test agent')
     s._call = Mock(return_value=(200, 'data', 3))
     s.call('body')
     s._call.assert_called_with('body', {'User-Agent': 'test agent'})
Esempio n. 2
0
 def test_call_without_user_agent(self):
     s = HttpService('host', 42, 'path')
     s._call = Mock(return_value=(200, 'data', 3))
     s.call('body')
     s._call.assert_called_with('body', {})