Skip to content

Commit

Permalink
test: make order explicit (pypi#14883)
Browse files Browse the repository at this point in the history
  • Loading branch information
miketheman authored Nov 9, 2023
1 parent 5be410a commit 5a6b70c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/organizations/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ def test_approve_organization_application(

assert organization_service.get_organization_applications_by_name(
organization_application.name
) == [organization_application, competing_organization_application]
) == sorted([organization_application, competing_organization_application])
assert organization_service.get_organization_applications_by_name(
organization_application.name, undecided=True
) == [organization_application, competing_organization_application]
) == sorted([organization_application, competing_organization_application])

assert (
organization_service.get_organization_by_name(organization_application.name)
Expand Down
3 changes: 3 additions & 0 deletions warehouse/organizations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ class OrganizationApplication(OrganizationMixin, db.Model):
back_populates="application", viewonly=True
)

def __lt__(self, other: OrganizationApplication) -> bool:
return self.name < other.name


class OrganizationNameCatalog(db.Model):
__tablename__ = "organization_name_catalog"
Expand Down

0 comments on commit 5a6b70c

Please sign in to comment.