Skip to content

Commit

Permalink
German jobs (#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
Long Nguyen authored and fcurella committed Oct 3, 2019
1 parent 6178178 commit 607ed1c
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ nosetests.xml
# IDE
*.sw[po]
*.iml
*.ipr
*.ipr
venv/
45 changes: 45 additions & 0 deletions faker/providers/job/de_DE/__init__.py
Original file line number Diff line number Diff line change
@@ -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',
]
22 changes: 22 additions & 0 deletions tests/providers/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 607ed1c

Please sign in to comment.