How to get and update doctype data in json format using requests.post in python

I have crēated a custom doctype “Test” in hosted erpnext account.
2 fields test_date and test_name
I want to update test_name to “test_2” using requests.put

https://xxx.erpnext.com/api/resource/Test/aa” api result gives:
{“data”:{“name”:“aa”,“owner”:“xxxx”,“creation”:“xxxxx”,“modified”:“xxxx”,“modified_by”:“xxxx”,“idx”:0,“docstatus”:0,“test_date”:“vvvv”,“test_name”:“test1”,“doctype”:“Test”}}

i have tried below code

headers = dict(Accept=‘application/json’)
session = requests.Session()
verify = True

r =requests.post( “https://xxx.erpnext.com/api/resource/Test/aa”, data= {‘usr’: “xxx.com”,
‘pwd’: “xxxxxx”},headers=headers,verify=True)

print(r.json()) gives {}

I want to update test_name to “test_2” using requests.put