Skip to content

Commit

Permalink
Aktualizacja testów jednostkowych
Browse files Browse the repository at this point in the history
  • Loading branch information
m.chechlacz committed Sep 10, 2024
1 parent 1d83dce commit a73437d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion pola/company/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ class Brand(TimeStampedModel):
region_name='eu-central-1',
),
)
website_url = models.CharField(max_length=128, null=False, blank=False, verbose_name=_("URL marki"), default="example.pl")
website_url = models.CharField(
max_length=128, null=False, blank=False, verbose_name=_("URL marki"), default="example.pl"
)

def __str__(self):
return self.common_name or self.name
Expand Down
4 changes: 3 additions & 1 deletion pola/rpc_api/tests/test_views_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ def test_should_return_200_when_one_comand_in_brand_and_product(self):
self.maxDiff = None
self.assertEqual(
{
'all_company_brands': [{'logotype_url': None, 'name': p.brand.common_name}],
'all_company_brands': [
{'logotype_url': None, 'name': p.brand.common_name, 'website_url': p.brand.website_url}
],
'altText': None,
'card_type': 'type_white',
'code': '5900049011829',
Expand Down
1 change: 1 addition & 0 deletions pola/rpc_api/tests/test_views_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def test_should_return_200_when_product_with_brand_and_image(self):
'all_company_brands': [
{
'name': b.common_name,
'website_url': 'example.pl',
}
],
'product_id': p.pk,
Expand Down
4 changes: 2 additions & 2 deletions pola/tests/test_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ def test_display_brand_when_enabled_on_company(self):
expected_response = (
{
'all_company_brands': [
{'logotype_url': None, 'name': 'brand-2'},
{'logotype_url': None, 'name': 'brand-1'},
{'logotype_url': None, 'name': 'brand-2', 'website_url': 'example.pl'},
{'logotype_url': None, 'name': 'brand-1', 'website_url': 'example.pl'},
],
'altText': None,
'card_type': 'type_grey',
Expand Down

0 comments on commit a73437d

Please sign in to comment.