Skip to content

Commit

Permalink
Add nl_BE company provider (#1811)
Browse files Browse the repository at this point in the history
  • Loading branch information
takis authored Mar 20, 2023
1 parent b019116 commit ff79125
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions faker/providers/company/nl_BE/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from .. import Provider as CompanyProvider


class Provider(CompanyProvider):
formats = (
"{{last_name}} {{company_suffix}}",
"{{last_name}}-{{last_name}} {{company_suffix}}",
"{{last_name}}, {{last_name}} en {{last_name}} {{company_suffix}}",
)
company_suffixes = ("NV", "BV", "CV", "VOF", "CommV")
11 changes: 11 additions & 0 deletions tests/providers/test_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from faker.providers.company.hy_AM import Provider as HyAmCompanyProvider
from faker.providers.company.it_IT import Provider as ItItCompanyProvider
from faker.providers.company.ja_JP import Provider as JaJpCompanyProvider
from faker.providers.company.nl_BE import Provider as NlBeCompanyProvider
from faker.providers.company.nl_NL import Provider as NlNlCompanyProvider
from faker.providers.company.pl_PL import Provider as PlPlCompanyProvider
from faker.providers.company.pl_PL import company_vat_checksum, local_regon_checksum, regon_checksum
Expand Down Expand Up @@ -465,3 +466,13 @@ def test_company_suffix(self, faker, num_samples):
suffix = faker.company_suffix()
assert isinstance(suffix, str)
assert suffix in ElGrCompanyProvider.company_suffixes


class TestNlBe:
"""Test nl_BE company provider methods"""

def test_company_suffix(self, faker, num_samples):
for _ in range(num_samples):
suffix = faker.company_suffix()
assert isinstance(suffix, str)
assert suffix in NlBeCompanyProvider.company_suffixes

0 comments on commit ff79125

Please sign in to comment.