diff --git a/lemarche/templates/tenders/_list_item_siae.html b/lemarche/templates/tenders/_list_item_siae.html
index 705755c35..e755d14a8 100644
--- a/lemarche/templates/tenders/_list_item_siae.html
+++ b/lemarche/templates/tenders/_list_item_siae.html
@@ -1,4 +1,4 @@
-{% load static humanize get_verbose_name %}
+{% load static humanize %}
@@ -27,31 +27,6 @@
{{ tender.title }}
-
- {% if tender.contact_company_name_display %}
-
-
- {{ tender.contact_company_name_display }}
-
- {% endif %}
-
- {% if tender.perimeters_list_string %}
-
- {{ tender.location_display|safe }}
- {% endif %}
-
-
- {% if tender.sectors.count %}
-
- {{ tender.sectors_list_string|safe }}
- {% endif %}
-
-
- {% if tender.amount %}
-
- {{ tender.get_amount_display|default:"-" }}
- {% endif %}
-
-
+ {% include "tenders/_list_item_detail_row.html" with tender=tender %}
diff --git a/lemarche/www/dashboard_networks/tests.py b/lemarche/www/dashboard_networks/tests.py
index c8cd48297..b54d1b134 100644
--- a/lemarche/www/dashboard_networks/tests.py
+++ b/lemarche/www/dashboard_networks/tests.py
@@ -27,12 +27,14 @@ def setUpTestData(cls):
cls.network_2 = NetworkFactory(name="Liste 2")
cls.user_network_1 = UserFactory(kind=User.KIND_PARTNER, partner_network=cls.network_1)
cls.user_network_2 = UserFactory(kind=User.KIND_PARTNER, partner_network=cls.network_2)
- cls.user_buyer = UserFactory(kind=User.KIND_BUYER)
+ cls.user_buyer = UserFactory(kind=User.KIND_BUYER, company_name="Entreprise Buyer")
cls.user_without_network = UserFactory(kind=User.KIND_PARTNER)
cls.siae_1 = SiaeFactory(networks=[cls.network_1])
cls.siae_2 = SiaeFactory()
cls.tender_1 = TenderFactory(
author=cls.user_buyer,
+ amount=tender_constants.AMOUNT_RANGE_100_150,
+ accept_share_amount=False,
status=tender_constants.STATUS_VALIDATED,
validated_at=timezone.now(),
deadline_date=timezone.now() - timedelta(days=5),
@@ -94,6 +96,8 @@ def test_tender_list_in_network_tender_list(self):
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
self.assertContains(response, self.tender_1.title)
+ self.assertContains(response, "Entreprise Buyer")
+ self.assertNotContains(response, "K€") # !accept_share_amount
self.assertContains(response, "1 adhérent notifié")
self.assertNotContains(response, self.tender_2.title)
diff --git a/lemarche/www/tenders/tests.py b/lemarche/www/tenders/tests.py
index 020dd3f62..aeab23de2 100644
--- a/lemarche/www/tenders/tests.py
+++ b/lemarche/www/tenders/tests.py
@@ -28,7 +28,7 @@ class TenderCreateViewTest(TestCase):
@classmethod
def setUpTestData(cls):
cls.user_siae = UserFactory(kind=User.KIND_SIAE)
- cls.user_buyer = UserFactory(kind=User.KIND_BUYER, company_name="Test")
+ cls.user_buyer = UserFactory(kind=User.KIND_BUYER, company_name="Entreprise Buyer")
cls.sectors = [SectorFactory().slug for _ in range(3)]
cls.location_slug = PerimeterFactory().slug
@@ -343,7 +343,7 @@ def setUpTestData(cls):
cls.siae_1 = SiaeFactory()
cls.siae_2 = SiaeFactory(post_code=perimeter.post_codes[0])
cls.siae_user_2 = UserFactory(kind=User.KIND_SIAE, siaes=[cls.siae_1])
- cls.user_buyer_1 = UserFactory(kind=User.KIND_BUYER)
+ cls.user_buyer_1 = UserFactory(kind=User.KIND_BUYER, company_name="Entreprise Buyer")
cls.user_buyer_2 = UserFactory(kind=User.KIND_BUYER)
cls.user_partner = UserFactory(kind=User.KIND_PARTNER)
cls.tender = TenderFactory(author=cls.user_buyer_1, validated_at=timezone.now(), perimeters=[perimeter])
@@ -352,6 +352,8 @@ def setUpTestData(cls):
)
cls.tender_3 = TenderFactory(
author=cls.user_buyer_1,
+ amount=tender_constants.AMOUNT_RANGE_100_150,
+ accept_share_amount=False,
validated_at=timezone.now(),
deadline_date=timezone.now() - timedelta(days=5),
perimeters=[perimeter],
@@ -386,6 +388,9 @@ def test_siae_user_should_see_matching_tenders(self):
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.context["tenders"]), 1)
+ self.assertContains(response, self.tender_3.title)
+ self.assertContains(response, "Entreprise Buyer")
+ self.assertNotContains(response, "K€") # !accept_share_amount
self.assertNotContains(response, "2 prestataires ciblés") # tender_3, but only visible to author
self.assertNotContains(response, "1 prestataire intéressé") # tender_3, but only visible to author