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 our ProjectFactory and UserFactory implicitly creating roles without names, since they bypass the RoleFactory.
We should update our test fixtures to allow us to set nullable=False.
Some possible leads: https://factoryboy.readthedocs.io/en/latest/reference.html
Pairing with @ewdurbin on #2745 we noticed that
Role.role_namecan be null:https://github.com/pypa/warehouse/blob/32f621a359bfa7ecb84d8b0ff77e675aae2cd9e1/warehouse/packaging/models.py#L64
Enforcing this to be
nullable=Falsecauses a lot of our tests to fail due to ourProjectFactoryandUserFactoryimplicitly 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