Skip to content

Commit b40e4e2

Browse files
committed
added test for matches
All reset tables are in one debug route.
1 parent 97d1288 commit b40e4e2

File tree

3 files changed

+137
-136
lines changed

3 files changed

+137
-136
lines changed

PyMatcha.postman_collection.json

Lines changed: 113 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@
625625
"tests[\"JSON return code is 200\"] = response.code == 200",
626626
"",
627627
"tests[\"success is true\"] = response.success == true",
628-
"tests[\"Message is correct\"] = response.message == \"User successfully confirmed\"",
628+
"tests[\"Message is correct\"] = response.message == \"User successfully confirmed.\"",
629629
""
630630
],
631631
"type": "text/javascript"
@@ -674,7 +674,7 @@
674674
"tests[\"JSON return code is 200\"] = response.code == 200",
675675
"",
676676
"tests[\"success is true\"] = response.success == true",
677-
"tests[\"Message is correct\"] = response.message == \"User already confirmed\"",
677+
"tests[\"Message is correct\"] = response.message == \"User already confirmed.\"",
678678
""
679679
],
680680
"type": "text/javascript"
@@ -2362,7 +2362,7 @@
23622362
"tests[\"JSON return code is 200\"] = response.code == 200",
23632363
"",
23642364
"tests[\"success is true\"] = response.success == true",
2365-
"tests[\"Message is correct\"] = response.message == \"User successfully confirmed\"",
2365+
"tests[\"Message is correct\"] = response.message == \"User successfully confirmed.\"",
23662366
""
23672367
],
23682368
"type": "text/javascript"
@@ -2656,7 +2656,7 @@
26562656
" pm.response.to.have.status(200);",
26572657
"});",
26582658
"",
2659-
"tests[\"Is geohash correct\"] = response.geohash == \"ezzweqbd4wuk\""
2659+
"tests[\"Is geohash correct\"] = response.geohash == \"ezzw82vu4u1r\""
26602660
],
26612661
"type": "text/javascript"
26622662
}
@@ -3699,7 +3699,8 @@
36993699
"tests[\"JSON return code is 200\"] = response.code == 200",
37003700
"",
37013701
"tests[\"success is true\"] = response.success == true",
3702-
""
3702+
"",
3703+
"tests[\"Messag is correct\"] = response.message == \"Liked user.\""
37033704
],
37043705
"type": "text/javascript"
37053706
}
@@ -3935,6 +3936,92 @@
39353936
"protocolProfileBehavior": {},
39363937
"_postman_isSubFolder": true
39373938
},
3939+
{
3940+
"name": "Match user",
3941+
"item": [
3942+
{
3943+
"name": "Create fake like",
3944+
"request": {
3945+
"auth": {
3946+
"type": "noauth"
3947+
},
3948+
"method": "POST",
3949+
"header": [
3950+
{
3951+
"key": "debug-auth-token",
3952+
"value": "{{debug_token}}",
3953+
"type": "text"
3954+
}
3955+
],
3956+
"body": {
3957+
"mode": "raw",
3958+
"raw": "{\n \"liker_uid\": \"like_me\",\n \"liked_uid\": \"{{user_username}}\"\n}",
3959+
"options": {
3960+
"raw": {
3961+
"language": "json"
3962+
}
3963+
}
3964+
},
3965+
"url": {
3966+
"raw": "{{host}}/debug/like",
3967+
"host": [
3968+
"{{host}}"
3969+
],
3970+
"path": [
3971+
"debug",
3972+
"like"
3973+
]
3974+
}
3975+
},
3976+
"response": []
3977+
},
3978+
{
3979+
"name": "Like like_me user match",
3980+
"event": [
3981+
{
3982+
"listen": "test",
3983+
"script": {
3984+
"id": "df978384-30fb-4ec0-acc8-14845fee3d94",
3985+
"exec": [
3986+
"var response = JSON.parse(responseBody);",
3987+
"",
3988+
"",
3989+
"pm.test(\"Status code is 200\", function () {",
3990+
" pm.response.to.have.status(200);",
3991+
"});",
3992+
"",
3993+
"tests[\"JSON return code is 200\"] = response.code == 200",
3994+
"",
3995+
"tests[\"success is true\"] = response.success == true",
3996+
"",
3997+
"",
3998+
"tests[\"Message is correct\"] = response.message == \"It's a match !\"",
3999+
""
4000+
],
4001+
"type": "text/javascript"
4002+
}
4003+
}
4004+
],
4005+
"request": {
4006+
"method": "POST",
4007+
"header": [],
4008+
"url": {
4009+
"raw": "{{host}}/like/like_me",
4010+
"host": [
4011+
"{{host}}"
4012+
],
4013+
"path": [
4014+
"like",
4015+
"like_me"
4016+
]
4017+
}
4018+
},
4019+
"response": []
4020+
}
4021+
],
4022+
"protocolProfileBehavior": {},
4023+
"_postman_isSubFolder": true
4024+
},
39384025
{
39394026
"name": "Delete user like_me",
39404027
"event": [
@@ -4035,7 +4122,7 @@
40354122
"response": []
40364123
},
40374124
{
4038-
"name": "Reset views table",
4125+
"name": "Reset tables",
40394126
"event": [
40404127
{
40414128
"listen": "test",
@@ -4064,97 +4151,13 @@
40644151
}
40654152
],
40664153
"url": {
4067-
"raw": "{{host}}/debug/views",
4068-
"host": [
4069-
"{{host}}"
4070-
],
4071-
"path": [
4072-
"debug",
4073-
"views"
4074-
]
4075-
}
4076-
},
4077-
"response": []
4078-
},
4079-
{
4080-
"name": "Reset reports table",
4081-
"event": [
4082-
{
4083-
"listen": "test",
4084-
"script": {
4085-
"id": "ddc96ae3-defe-40c5-b607-aba4498c7e58",
4086-
"exec": [
4087-
"pm.test(\"Status code is 200\", function () {",
4088-
" pm.response.to.have.status(204);",
4089-
"});",
4090-
""
4091-
],
4092-
"type": "text/javascript"
4093-
}
4094-
}
4095-
],
4096-
"request": {
4097-
"auth": {
4098-
"type": "noauth"
4099-
},
4100-
"method": "DELETE",
4101-
"header": [
4102-
{
4103-
"key": "debug-auth-token",
4104-
"type": "text",
4105-
"value": "{{debug_token}}"
4106-
}
4107-
],
4108-
"url": {
4109-
"raw": "{{host}}/debug/reports",
4110-
"host": [
4111-
"{{host}}"
4112-
],
4113-
"path": [
4114-
"debug",
4115-
"reports"
4116-
]
4117-
}
4118-
},
4119-
"response": []
4120-
},
4121-
{
4122-
"name": "Reset likes table",
4123-
"event": [
4124-
{
4125-
"listen": "test",
4126-
"script": {
4127-
"id": "151579af-9a16-4ec1-9b26-9c8da7e12de2",
4128-
"exec": [
4129-
"pm.test(\"Status code is 200\", function () {",
4130-
" pm.response.to.have.status(204);",
4131-
"});",
4132-
""
4133-
],
4134-
"type": "text/javascript"
4135-
}
4136-
}
4137-
],
4138-
"request": {
4139-
"auth": {
4140-
"type": "noauth"
4141-
},
4142-
"method": "DELETE",
4143-
"header": [
4144-
{
4145-
"key": "debug-auth-token",
4146-
"type": "text",
4147-
"value": "{{debug_token}}"
4148-
}
4149-
],
4150-
"url": {
4151-
"raw": "{{host}}/debug/likes",
4154+
"raw": "{{host}}/debug/tables",
41524155
"host": [
41534156
"{{host}}"
41544157
],
41554158
"path": [
41564159
"debug",
4157-
"likes"
4160+
"tables"
41584161
]
41594162
}
41604163
},
@@ -4222,109 +4225,109 @@
42224225
],
42234226
"variable": [
42244227
{
4225-
"id": "ee67a08e-cac2-4171-bfa7-e9fadea3ddc6",
4228+
"id": "af6aee14-6e91-4d11-8b5c-e8cc1438311d",
42264229
"key": "host",
42274230
"value": "http://127.0.0.1:5000",
42284231
"type": "string"
42294232
},
42304233
{
4231-
"id": "4b4becbf-50e6-422b-880c-91f5a94ed892",
4234+
"id": "fdea782c-2dab-4410-b65a-73a1a22c73ea",
42324235
"key": "user_id",
42334236
"value": "",
42344237
"type": "string"
42354238
},
42364239
{
4237-
"id": "6939f737-6b8f-4c82-9079-6a142843ce0e",
4240+
"id": "f0404a42-abab-428a-872e-c0e0e71df739",
42384241
"key": "user_email",
42394242
"value": "foo@example.org",
42404243
"type": "string"
42414244
},
42424245
{
4243-
"id": "e2597b69-58b5-4b21-80fa-30d5ce920d37",
4246+
"id": "289e6da9-63c2-405c-aa04-dc1e7c944ae7",
42444247
"key": "user_username",
42454248
"value": "foo",
42464249
"type": "string"
42474250
},
42484251
{
4249-
"id": "3f9ab841-953a-4497-842a-d81383492354",
4252+
"id": "106fef29-98b9-46e3-aa0c-2a720d018604",
42504253
"key": "user_password",
42514254
"value": "admin",
42524255
"type": "string"
42534256
},
42544257
{
4255-
"id": "e9b7359b-2cd6-46e8-98b1-6b99b1ec4c90",
4258+
"id": "a6221612-0ff9-4299-b316-54f0f501dcec",
42564259
"key": "user_firstname",
42574260
"value": "Foo",
42584261
"type": "string"
42594262
},
42604263
{
4261-
"id": "91eaa561-d594-4d4d-a4e4-64dd2d2efd3a",
4264+
"id": "939c43d6-9dad-4e7e-96ce-09c831499a1e",
42624265
"key": "user_lastname",
42634266
"value": "Bar",
42644267
"type": "string"
42654268
},
42664269
{
4267-
"id": "557b849c-f69a-4cf1-a377-a8e9e028872d",
4270+
"id": "2544a319-3ac2-4083-9665-42b5bab9df10",
42684271
"key": "debug_token",
42694272
"value": "xX69jules69Xx",
42704273
"type": "string"
42714274
},
42724275
{
4273-
"id": "e3971560-7a70-49dd-8bb7-85d4ff29db4e",
4276+
"id": "fcbb3982-a60a-4797-9d53-7805b775d380",
42744277
"key": "user_access_token",
42754278
"value": "",
42764279
"type": "string"
42774280
},
42784281
{
4279-
"id": "9b88d900-87a1-4f60-944c-2dc63d53749d",
4282+
"id": "9f004407-c35e-4556-a22a-747fdf0b9f79",
42804283
"key": "user_refresh_token",
42814284
"value": "",
42824285
"type": "string"
42834286
},
42844287
{
4285-
"id": "620ed0b8-89b5-4f8d-b13e-f28bea6c9c9f",
4288+
"id": "a07c4180-3179-4aff-8575-46fb9e42ea83",
42864289
"key": "expired_token",
42874290
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1OTAyNDIyNjQsIm5iZiI6MTU5MDI0MjI2NCwianRpIjoiNTM0ZGI5NzQtOWE4Ni00MGViLWE1NDEtMDg3N2ZmNzQ3NDVhIiwiZXhwIjoxNTkwMjQyMzI0LCJpZGVudGl0eSI6eyJpZCI6NTEyLCJlbWFpbCI6ImZvb0BleGFtcGxlLm9yZyIsInVzZXJuYW1lIjoiYmFyIiwiaXNfb25saW5lIjp0cnVlLCJkYXRlX2xhc3RzZWVuIjoiU2F0LCAyMyBNYXkgMjAyMCAxMzo1Nzo0NCBHTVQifSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.NTp2P0WNkXDwzuzrcNIQdeAfizQ57HQgkzBLSvY1yHU",
42884291
"type": "string"
42894292
},
42904293
{
4291-
"id": "a3eef71e-5568-4aba-8bca-146e2027aa7d",
4294+
"id": "4ba17b0e-8325-4a02-ae90-01c4a4f499f1",
42924295
"key": "user_orientation",
42934296
"value": "heterosexual",
42944297
"type": "string"
42954298
},
42964299
{
4297-
"id": "1ee06cf0-f453-40d2-ac74-a0f89c090ee9",
4300+
"id": "d6d9c37f-da1a-4c4e-afa2-f9214637e13c",
42984301
"key": "user_bio",
42994302
"value": "Lorem Ipsum is the single greatest threat. We are not - we are not keeping up with other websites. Lorem Ipsum best not make any more threats to your website. It will be met with fire and fury like the world has never seen. Does everybody know that pig named Lorem Ipsum? An ‘extremely credible source’ has called my office and told me that Barack Obama’s placeholder text is a fraud.",
43004303
"type": "string"
43014304
},
43024305
{
4303-
"id": "16f369cb-5586-46c9-bc93-5c57e2d64dee",
4306+
"id": "d3900cb1-01d2-4915-9ce8-37d1d790b560",
43044307
"key": "user_gender",
43054308
"value": "male",
43064309
"type": "string"
43074310
},
43084311
{
4309-
"id": "f959c265-7b2d-4037-88ad-64c6720cb9e2",
4312+
"id": "ed9ccd93-a2ab-4dd0-9b68-57477110cbf1",
43104313
"key": "user_birthdate",
43114314
"value": "06/04/1998",
43124315
"type": "string"
43134316
},
43144317
{
4315-
"id": "8430e220-97ab-48af-89ad-078fb179d607",
4318+
"id": "e117a4aa-6f76-4715-bdb3-8023b1d74f81",
43164319
"key": "user_lat",
43174320
"value": "44.8404",
43184321
"type": "string"
43194322
},
43204323
{
4321-
"id": "070eddd1-d4a5-4a47-a2a0-56c06676f540",
4324+
"id": "bf8a919e-2fe7-4139-b82c-b215ea6584b3",
43224325
"key": "user_lng",
43234326
"value": "-0.5805",
43244327
"type": "string"
43254328
},
43264329
{
4327-
"id": "9943cf39-5557-4424-8b9c-ca532d935090",
4330+
"id": "6208b5f1-e496-4642-9e38-4faa9b4e950d",
43284331
"key": "user_ip",
43294332
"value": "77.205.46.181",
43304333
"type": "string"

0 commit comments

Comments
 (0)