diff --git a/faker/providers/automotive/nl_BE/__init__.py b/faker/providers/automotive/nl_BE/__init__.py new file mode 100644 index 0000000000..19f24cac68 --- /dev/null +++ b/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-???-###", + ) diff --git a/tests/providers/test_automotive.py b/tests/providers/test_automotive.py index 6d3f27af57..7768b53140 100644 --- a/tests/providers/test_automotive.py +++ b/tests/providers/test_automotive.py @@ -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})")