From 9d2b6ee10ec5359cc91769d430485c8c869ba1a8 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 24 Dec 2020 10:51:40 +0530 Subject: monorepo --- backend/tests/product/chair.json | 6 ++++++ backend/tests/product/dumb_sofa.json | 4 ++++ backend/tests/product/smart_sofa.json | 6 ++++++ backend/tests/requests.txt | 21 +++++++++++++++++++++ backend/tests/users/add_akshay.json | 8 ++++++++ backend/tests/users/add_user.json | 7 +++++++ 6 files changed, 52 insertions(+) create mode 100644 backend/tests/product/chair.json create mode 100644 backend/tests/product/dumb_sofa.json create mode 100644 backend/tests/product/smart_sofa.json create mode 100644 backend/tests/requests.txt create mode 100644 backend/tests/users/add_akshay.json create mode 100644 backend/tests/users/add_user.json (limited to 'backend/tests') diff --git a/backend/tests/product/chair.json b/backend/tests/product/chair.json new file mode 100644 index 0000000..bb13c8b --- /dev/null +++ b/backend/tests/product/chair.json @@ -0,0 +1,6 @@ +{ + "name": "Urban Ladder Teak Chair", + "kind": "Chair", + "price": 3500, + "description": "Sleek, modern chair for offices and workplaces" +} diff --git a/backend/tests/product/dumb_sofa.json b/backend/tests/product/dumb_sofa.json new file mode 100644 index 0000000..2b09a58 --- /dev/null +++ b/backend/tests/product/dumb_sofa.json @@ -0,0 +1,4 @@ +{ + "name": "Home Town Leather Sofa", + "price": 5400 +} diff --git a/backend/tests/product/smart_sofa.json b/backend/tests/product/smart_sofa.json new file mode 100644 index 0000000..5d7f7d4 --- /dev/null +++ b/backend/tests/product/smart_sofa.json @@ -0,0 +1,6 @@ +{ + "name": "Home Town Leather Sofa", + "kind": "Sofa", + "description": "Comfortable, authentic leather, wooden frame sofa, for living rooms", + "price": 5400 +} diff --git a/backend/tests/requests.txt b/backend/tests/requests.txt new file mode 100644 index 0000000..7e2ca5c --- /dev/null +++ b/backend/tests/requests.txt @@ -0,0 +1,21 @@ +http POST :7878/user/login username=akshay password=password + +http POST :7878/user/login username=akshay password=nigga + +http POST :7878/user/change_password Cookie: old_password=nigga new_password=nigga + +http :7878/user/change_password username=akshay password=password + +http :7878/product/catalog + +http :7878/product/1 + +http POST :7878/cart/add Cookie: product_id:=1 + +http :7878/cart/items Cookie: + +http POST :7878/cart/remove Cookie: product_id:=1 + +http POST :7878/rating/add Cookie: product_id:=1 stars:=3 comment_text=Very good functional chair + +http :7878/product/reviews/1 diff --git a/backend/tests/users/add_akshay.json b/backend/tests/users/add_akshay.json new file mode 100644 index 0000000..1d6c405 --- /dev/null +++ b/backend/tests/users/add_akshay.json @@ -0,0 +1,8 @@ + +{ + "username": "Akshay", + "password": "akshay", + "phone_number": "123454234", + "email_id": "aks@hay.com", + "address": "Rv College of Engineering, Mysuru Road, 560087, Near Metro station" +} diff --git a/backend/tests/users/add_user.json b/backend/tests/users/add_user.json new file mode 100644 index 0000000..1f481e9 --- /dev/null +++ b/backend/tests/users/add_user.json @@ -0,0 +1,7 @@ +{ + "username": "Ramu Kaka", + "password": "ramu123", + "phone_number": "123454234", + "email_id": "ramu@kaka.com", + "address": "RA-602, Purva Riviera" +} -- cgit v1.2.3