Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@Placebo.decorate(url='http://www.example.com/api/item',
body=json.dumps({'name': 'Huseyin',
'last_name': 'Yilmaz'}))
def test_placebo_without_subclass(self):
url = 'http://www.example.com/api/item'
expected_response = {'name': 'Huseyin', 'last_name': 'Yilmaz'}
response = requests.get(url)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.json(), expected_response)