def test_put(self): headers = {'authorization': '930b5250fb9e23c32e8b9357d8334aa3e373ff7a'} json_content = {'status': 2} response = requests.put(self.test_url, headers=headers, data=json.dumps(json_content)) self.assertEqual(response.status_code, 200) self.assertEqual(response.json()['status'], 2)
def test_put(self): headers = {'Authorization': '930b5250fb9e23c32e8b9357d8334aa3e373ff7a'} json_content = {'name': 'f**k man', 'description': 'f**k boy'} response = requests.put( self.test_url, headers=headers, data=json.dumps(json_content)) self.assertEqual(response.status_code, 200) self.assertEqual(response.json()['name'], 'f**k man') self.assertEqual(response.json()['description'], 'f**k boy')
def test_put(self): headers = {'Authorization': '930b5250fb9e23c32e8b9357d8334aa3e373ff7a'} json_content = {'name': 'f**k man', 'description': 'f**k boy'} response = requests.put(self.test_url, headers=headers, data=json.dumps(json_content)) self.assertEqual(response.status_code, 200) self.assertEqual(response.json()['name'], 'f**k man') self.assertEqual(response.json()['description'], 'f**k boy')
def test_put(self): json_content = {'name': 'yuanbowen', 'email': '*****@*****.**'} response = requests.put(self.test_url, data=json.dumps(json_content)) self.assertEqual(response.status_code, 200) self.assertEqual(response.json()['name'], 'yuanbowen') self.assertEqual(response.json()['email'], '*****@*****.**')