From 9c1b9997b6ba1c709202320f2b74d9d0856e0a0c Mon Sep 17 00:00:00 2001 From: Akif9748 Date: Sun, 3 Apr 2022 22:05:29 +0300 Subject: [PATCH] Added user example --- tests/get_user.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/get_user.py diff --git a/tests/get_user.py b/tests/get_user.py new file mode 100644 index 0000000..42148cc --- /dev/null +++ b/tests/get_user.py @@ -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 + } +}