Skip to content

Role.role_name can be null #7688

@di

Description

@di

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    developer experienceAnything that improves the experience for Warehouse devstestingTest infrastructure and individual tests

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions