From c443b9bb071e86b5a9c5251e61999d5b6781e00e Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 9 May 2021 23:11:51 -0700 Subject: [PATCH] + More tests for the /neighbor/add and /neighbor/list routes These are baseline tests however a new /neighbor/remove & /neighbor/edit route should be edited before I call this done on the roadmap. Also some more intense testing around these current routes is required. Mostly because the expectation that JSON is being sent to us in /neighbor/add It could be worth the effort to send this data as json in the body ! Currently parameters are sent via the query string is in line with how most routes behave For this route is just feels weird dealing with al the issues with json in the query string --- json-api/client-tests/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/json-api/client-tests/main.py b/json-api/client-tests/main.py index 189a58b..4c092f5 100644 --- a/json-api/client-tests/main.py +++ b/json-api/client-tests/main.py @@ -124,7 +124,9 @@ if __name__ == '__main__': req(admin, 'post', '/members/me/nickname', {'nick': f'randy-{time()}'}, 200), req(admin , 'get', '/invite/join', {'code': 123}, 404), req(admin , "get", "/meta", {}, 200), - req(admin, 'get', '/neighbors/list', {}, 200, verbose=True) + req(admin, 'get', '/neighbor/list', {}, 200), + req(admin,'post', '/neighbor/add', {'name':'name','url':'url','wsurl':'wsurl','description':'asdf','tags':'["red","blue"]'}, 200), + req(admin, 'get', '/neighbor/list', {}, 200, verbose=True) ]) # add this after fire the generic tests