Pulp unit tests require pulp_file
The pulp unit tests require the pulp_file plugin. This is a problem because we're not running the pulp unit tests against pulp_file PRs so pulp_file changes could break unknowingly break pulp unit tests.
Also, I wonder if unit tests should be requiring a plugin. Unit tests ought to probably mock code instead.
#5 Updated by gmbnomis over 1 year ago
I agree. I did not like using
FileContent when writing the test linked above. The main problem is that there seems to be no 'official' way to create models for testing in Django (see https://code.djangoproject.com/ticket/7835 for example)
In the linked example, we could get away with using the base
Content class. But in general using
- won't detect cases that have a missing `.cast()`
- won't help to test code that needs natural keys (stages)
- won't help to test code (like stages) that has to deal with multiple content types
Currently, I don't have a good solution for this problem.
Please register to edit this issue