Role.role_name can be null #7688
Labels
developer experience
Anything that improves the experience for Warehouse devs
testing
Test infrastructure and individual tests
Pairing with @ewdurbin on #2745 we noticed that
Role.role_name
can be null:https://github.com/pypa/warehouse/blob/32f621a359bfa7ecb84d8b0ff77e675aae2cd9e1/warehouse/packaging/models.py#L64
Enforcing this to be
nullable=False
causes a lot of our tests to fail due to ourProjectFactory
andUserFactory
implicitly creating roles without names, since they bypass theRoleFactory
.We should update our test fixtures to allow us to set
nullable=False
.Some possible leads: https://factoryboy.readthedocs.io/en/latest/reference.html
The text was updated successfully, but these errors were encountered: