api: actually fixing tests

The previous commit fixed just the compilation of tests.