aboutsummaryrefslogtreecommitdiff
path: root/backend/tests
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-12-24 05:21:40 +0000
committerAkshay <[email protected]>2020-12-24 05:21:40 +0000
commit9d2b6ee10ec5359cc91769d430485c8c869ba1a8 (patch)
treeb2d541e575ab6e3f70cb709f156f06afca085881 /backend/tests
parent7c65421328552b08e64df25e224fe9d54d363e6e (diff)
monorepo
Diffstat (limited to 'backend/tests')
-rw-r--r--backend/tests/product/chair.json6
-rw-r--r--backend/tests/product/dumb_sofa.json4
-rw-r--r--backend/tests/product/smart_sofa.json6
-rw-r--r--backend/tests/requests.txt21
-rw-r--r--backend/tests/users/add_akshay.json8
-rw-r--r--backend/tests/users/add_user.json7
6 files changed, 52 insertions, 0 deletions
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 @@
1{
2 "name": "Urban Ladder Teak Chair",
3 "kind": "Chair",
4 "price": 3500,
5 "description": "Sleek, modern chair for offices and workplaces"
6}
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 @@
1{
2 "name": "Home Town Leather Sofa",
3 "price": 5400
4}
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 @@
1{
2 "name": "Home Town Leather Sofa",
3 "kind": "Sofa",
4 "description": "Comfortable, authentic leather, wooden frame sofa, for living rooms",
5 "price": 5400
6}
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 @@
1http POST :7878/user/login username=akshay password=password
2
3http POST :7878/user/login username=akshay password=nigga
4
5http POST :7878/user/change_password Cookie: old_password=nigga new_password=nigga
6
7http :7878/user/change_password username=akshay password=password
8
9http :7878/product/catalog
10
11http :7878/product/1
12
13http POST :7878/cart/add Cookie: product_id:=1
14
15http :7878/cart/items Cookie:
16
17http POST :7878/cart/remove Cookie: product_id:=1
18
19http POST :7878/rating/add Cookie: product_id:=1 stars:=3 comment_text=Very good functional chair
20
21http :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 @@
1
2{
3 "username": "Akshay",
4 "password": "akshay",
5 "phone_number": "123454234",
6 "email_id": "[email protected]",
7 "address": "Rv College of Engineering, Mysuru Road, 560087, Near Metro station"
8}
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 @@
1{
2 "username": "Ramu Kaka",
3 "password": "ramu123",
4 "phone_number": "123454234",
5 "email_id": "[email protected]",
6 "address": "RA-602, Purva Riviera"
7}