3dgeo-heidelberg / pytreedb

Python package providing a file and object-based database to store tree objects.
Other
28 stars 4 forks source link

Write tests for the pytreedb-server API #44

Closed lwiniwar closed 2 years ago

lwiniwar commented 2 years ago

We should write some tests to check the functionality of the HTTP API, covering all endpoints:

/search [POST]

/search/wssearch [POST]

/search/exportcollection [POST]

/search/lazlinks [POST]

/expotcsv [POST]

/query

/stats

/listspecies

/getitem

/sharedproperties

annachiu7 commented 2 years ago

I'm still changing the routings right now sweat

lwiniwar commented 2 years ago

tests have been added on the api-tests branch. @annachiu7 , please update the three last tests, currently they return empty results and I don't know what is expected from the client - there have been API changes recently. You could tests for number of returned elements, a single link (string equality), ...

lwiniwar commented 2 years ago

Here are the corresponding lines: https://github.com/3dgeo-heidelberg/pytreedb/blob/d2729b87e1995f27b6790ab328bf496dbd304c7e/webserver/pytreedb_server/test/test_api.py#L114-L133

annachiu7 commented 2 years ago

Updated in 4f0addd

lwiniwar commented 2 years ago

thanks!