Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
remove business_website como required! (#100)
Browse files Browse the repository at this point in the history
* remove business_website como required!

* Update tests/models/test_seller.py

Co-authored-by: PedroRegisPOAR <pedroalencarregis@hotmail.com>

* Update zoop_wrapper/models/seller.py

Co-authored-by: PedroRegisPOAR <pedroalencarregis@hotmail.com>

Co-authored-by: PedroRegisPOAR <pedroalencarregis@hotmail.com>
  • Loading branch information
rodrigondec and PedroRegisPOAR authored Aug 24, 2020
1 parent ad04331 commit c998ef6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 7 additions & 3 deletions tests/models/test_seller.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,20 @@ def test_business_required_fields(self):
"business_name",
"business_opening_date",
"business_phone",
"business_website",
"ein",
},
Seller.get_business_required_fields(),
)

def test_business_non_required_fields(self):
self.assertIsSubSet(
{"owner", "business_description", "business_facebook", "business_twitter"},
{
"business_website",
"business_description",
"business_facebook",
"business_twitter",
"owner",
},
Seller.get_business_non_required_fields(),
)

Expand Down Expand Up @@ -99,7 +104,6 @@ def test_business_get_validation_fields(self):
"business_name",
"business_opening_date",
"business_phone",
"business_website",
},
instance.get_validation_fields(),
)
Expand Down
9 changes: 7 additions & 2 deletions zoop_wrapper/models/seller.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,13 @@ def get_business_non_required_fields(cls):
fields = cls.get_non_required_fields()
return fields.union(
super().get_business_non_required_fields(),
{"owner", "business_description", "business_facebook", "business_twitter"},
{
"business_description",
"business_website",
"business_facebook",
"business_twitter",
"owner",
},
)

@classmethod
Expand All @@ -146,7 +152,6 @@ def get_business_required_fields(cls):
"business_name",
"business_opening_date",
"business_phone",
"business_website",
},
)

Expand Down

0 comments on commit c998ef6

Please sign in to comment.