Errors while running unit tests on plone.restapi

Hey, I've got Plone REST API with Plone v6 set up on WSL. I've decided to work on this (Serializer should use plone.app.uuid.utils.uuidToObject · Issue #1448 · plone/plone.restapi · GitHub) issue. The issues says that it passed all the test cases except the ones mentioned in the issue. But when I run test cases in this (plone.restapi/src/plone/restapi/tests at master · plone/plone.restapi · GitHub) directory using 'python -m unittest' I get 1038 cases failed and only 73 as passed. Almost all of them are raising KeyErrors exceptions.

I tried following this link (Contributing to plone.restapi — plone.restapi v8.24.2.dev0) for testing but I don't understand where 'bin/test' is.

Am I testing the wrong way? What am I doing wrong here?

Go to the top level plone.restapi directory. It contains a Makefile. There you can run make to build the software. Then make test should run all tests.

Alternatively, if you are working on more Plone packages, you can use the core development buildout. There is some documentation on how to use this, but you should make sure you are using the 6.0 branch. If you have this setup correctly, running bin/test -s plone.restapi will run the tests of this package.

1 Like

Thank you very much it works! Wouldn't it be convenient if this is added to a file like CONTRIBUTING.md or setup.md to the repo so that it is easy to setup the project for contributing?

1 Like