Skip to content

Commit

Permalink
Add nl_BE automotive provider (#1810)
Browse files Browse the repository at this point in the history
  • Loading branch information
takis committed Mar 20, 2023
1 parent 1d8ad18 commit b019116
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions faker/providers/automotive/nl_BE/__init__.py
@@ -0,0 +1,16 @@
from .. import Provider as AutomotiveProvider


class Provider(AutomotiveProvider):
"""Implement automotive provider for `nl_BE` locale.
https://nl.wikipedia.org/wiki/Belgisch_kenteken
"""

license_formats = (
"???-###", # 1973-2008
"###-???", # 2008-2010
# New formats after 2010
"1-???-###",
"2-???-###",
)
6 changes: 6 additions & 0 deletions tests/providers/test_automotive.py
Expand Up @@ -310,3 +310,9 @@ class TestDeCh(_SimpleAutomotiveTestMixin):
"""Test de_CH automotive provider methods"""

license_plate_pattern: Pattern = re.compile(r"[A-Z]{2}-\d{1,3}\s?\d{0,3}")


class TestNlBe(_SimpleAutomotiveTestMixin):
"""Test nl_BE automotive provider methods"""

license_plate_pattern: Pattern = re.compile(r"(\d{3}-[A-Z]{3})|" r"([A-Z]{3}-\d{3})|" r"([1-2]-[A-Z]{3}-\d{3})")

0 comments on commit b019116

Please sign in to comment.