diff --git a/.gitignore b/.gitignore index 797ef55f2e..22ff71090e 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,5 @@ nosetests.xml # IDE *.sw[po] *.iml -*.ipr \ No newline at end of file +*.ipr +venv/ \ No newline at end of file diff --git a/faker/providers/job/de_DE/__init__.py b/faker/providers/job/de_DE/__init__.py new file mode 100644 index 0000000000..6f41f1acce --- /dev/null +++ b/faker/providers/job/de_DE/__init__.py @@ -0,0 +1,45 @@ +# coding=utf-8 +from __future__ import unicode_literals +from .. import Provider as BaseProvider + + +class Provider(BaseProvider): + """ + Source: http://planet-beruf.de/schuelerinnen/mein-beruf/berufe-von-a-z/ + """ + jobs = [ + 'Altenpfleger', + 'Asphaltbauer', + 'Artist', + 'Augenoptiker', + 'Ausbaufacharbeiter', + 'Bäcker', + 'Bankkaufmann', + 'Beamter', + 'Binnenschiffer', + 'Chemikant', + 'Chirurgiemechaniker', + 'Designer', + 'Drogist', + 'Erzieher', + 'Elektroniker', + 'Fachinformatiker', + 'Fleischer', + 'Florist', + 'Forstwirst', + 'Friseur', + 'Informatiker', + 'Programmierer', + 'Techniker', + 'Mathematiker', + 'Koreanistiker', + 'Mechaniker', + 'Pfleger', + 'Polizist', + 'Pilot', + 'Arzt', + 'Krankenschwester', + 'Medizininformatiker', + 'Schornsteinfeger', + 'Winzer', + ] diff --git a/tests/providers/test_job.py b/tests/providers/test_job.py index 5cba37f808..3e5d0ff16f 100644 --- a/tests/providers/test_job.py +++ b/tests/providers/test_job.py @@ -55,3 +55,25 @@ def setUp(self): def test_job(self): job = self.factory.job() assert isinstance(job, six.string_types) + + +class TestDeDe(unittest.TestCase): + """ Tests jobs in the de_DE locale """ + + def setUp(self): + self.factory = Faker('de_DE') + + def test_job(self): + job = self.factory.job() + assert isinstance(job, six.string_types) + + +class TestFrFr(unittest.TestCase): + """ Tests jobs in the fr_FR locale """ + + def setUp(self): + self.factory = Faker('fr_FR') + + def test_job(self): + job = self.factory.job() + assert isinstance(job, six.string_types)