Improve API tests that make POST requests

There are API tests that issue HTTP POST requests and check the status code
returned by those HTTP requests. However, there are not tests which check
whether the just-created entities actually exist, nor whether their attributes
are correct. Add tests of this kind.
Merge pull request #1064 from Ichimonji10/api-tests

Improve API tests that make POST requests