Re: mocking for get method in requests

2019-03-26 Thread Toni Sissala
On 18.1.2019 19:16, Shakti Kumar wrote: Hello people, I noticed something weird (weird as per my current knowledge, though I know its subjective) today. Hi Kumar, mock_req.get('').return_value = 'Hello' Here you are calling mock_req -MagicMocks get-method with parameter '' and assigning '

Re: mocking for get method in requests

2019-03-16 Thread George Fischhof
Shakti Kumar ezt írta (időpont: 2019. jan. 18., P, 18:18): > Hello people, > I noticed something weird (weird as per my current knowledge, though I know > its subjective) today. > > sample.py file > > -- > > import requests > def random_testing(): > out = requests.get('www.cisco.com') > a