mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-26 13:20:41 +03:00
Added user example
This commit is contained in:
parent
c22f72dd90
commit
9c1b9997b6
1 changed files with 24 additions and 0 deletions
24
tests/get_user.py
Normal file
24
tests/get_user.py
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
import requests
|
||||||
|
|
||||||
|
# Headers for login to Akf-forum
|
||||||
|
headers = {
|
||||||
|
"username": "testUser",
|
||||||
|
"password": "testPassword"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
r = requests.get("http://localhost:3000/api/users/0/", headers=headers)
|
||||||
|
|
||||||
|
print(r.json())
|
||||||
|
|
||||||
|
example_response = {
|
||||||
|
'status': 200,
|
||||||
|
'result': {
|
||||||
|
'name': 'Akif9748',
|
||||||
|
'avatar': 'https://www.technopat.net/sosyal/data/avatars/o/298/298223.jpg?1644694020',
|
||||||
|
'time': 1647895891332,
|
||||||
|
'admin': True,
|
||||||
|
'deleted': False,
|
||||||
|
'id': 0
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue