Open jelly opened 2 weeks ago
I see that these tests should be skipped when mongoengine is not available. Why not skip the tests since mongodb is not available?
That is also an option, but it is still nice to run the tests. In theory users can run a mongodb server via podman and we do provide mongoengine
in the repositories.
I have opened a pull request to support that use case, please feel free to try out the patch and let us know if that would work for you!
The problem
factory-boy is packaged in Arch Linux and tests run while building the package in this buildchroot. The mongodb tests require a running mongodb server, mongodb is neither packaged nor is it possible to run a service during building.
Proposed solution
I've patched factory-boy to use mongomock, this succesfully ran the tests. Maybe factory-boy can optionally allow running the tests with
mongomock
when available.