1👍
✅
I think what you are missing is the following:
response = self.client.put('/api/v1/credit-card', {
'exp_date': '02/2028',
'holder': 'Olivia Johnson',
'number': '1234567891231234',
'cvv': '999'
}, headers=self.headers)
When you pass **self.headers
you basically are passing the following:
self.client.put('/api/v1/credit-card', {
'exp_date': '02/2028',
'holder': 'Olivia Johnson',
'number': '1234567891231234',
'cvv': '999'
}, Autorization=value)
And because normally most of the functions in python accept a kwargs
it will just leave headers=None
and that’s why you are strugling with this…
Source:stackexchange.com