+ More comprehensive testing on /neighbor/update

The cases that actually matter should be covered now so I'm confident with this
endpoint's behavior
! A preliminary db::neighbors::get is done to cover the 404 case
Basically if a bad url is used in the request we should 404 the update as there
won't be anything relevant to update
This commit is contained in:
shockrah
2021-05-12 13:05:52 -07:00
parent 8bff61ab71
commit e94c720332
2 changed files with 15 additions and 5 deletions

View File

@@ -141,6 +141,7 @@ if __name__ == '__main__':
req(admin,'post', '/neighbor/add', {}, 200, body=to_json(tmp_neighbor)),
req(admin, 'get', '/neighbor/list', {}, 200, verbose=True),
req(admin, 'put', '/neighbor/update', {'url':str(now)}, 200, body=to_json(updated_neighbor)),
req(admin, 'put', '/neighbor/update', {'url':'fake'}, 404, body=to_json(updated_neighbor)),
req(admin, 'get', '/neighbor/list', {}, 200, verbose=True),
])