Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Nov 21, 2023
1 parent 283162c commit db39085
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lemarche/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ def kind_detail_display(self):
if self.kind:
kind_detail_display_string += self.get_kind_display()
if self.buyer_kind_detail:
kind_detail_display_string += f" : {self.get_buyer_kind_detail_display()}"
# remove parenthesis suffix
kind_detail_display_string += f" : {self.get_buyer_kind_detail_display().split(' (', 1)[0]}"
elif self.partner_kind:
kind_detail_display_string += f" : {self.get_partner_kind_display()}"
return kind_detail_display_string
Expand Down
2 changes: 1 addition & 1 deletion lemarche/users/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_kind_detail_display(self):
self.assertEqual(user_buyer.kind_detail_display, "Acheteur")
self.assertEqual(user_partner.kind_detail_display, "Partenaire")
self.assertEqual(user_buyer_public.kind_detail_display, "Acheteur")
self.assertEqual(user_buyer_private_pme.kind_detail_display, "Acheteur : Privé : PME")
self.assertEqual(user_buyer_private_pme.kind_detail_display, "Acheteur : PME")
self.assertEqual(
user_partner_facilitator.kind_detail_display, "Partenaire : Facilitateur des clauses sociales"
)
Expand Down

0 comments on commit db39085

Please sign in to comment.