summaryrefslogtreecommitdiff
path: root/factory/faker.py
diff options
context:
space:
mode:
Diffstat (limited to 'factory/faker.py')
-rw-r--r--factory/faker.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/factory/faker.py b/factory/faker.py
index 10a0cba..5411985 100644
--- a/factory/faker.py
+++ b/factory/faker.py
@@ -94,3 +94,8 @@ class Faker(declarations.OrderedDeclaration):
cls._FAKER_REGISTRY[locale] = faker.Faker(locale=locale)
return cls._FAKER_REGISTRY[locale]
+
+ @classmethod
+ def add_provider(cls, provider, locale=None):
+ """Add a new Faker provider for the specified locale"""
+ cls._get_faker(locale).add_provider(provider)