Skip to content

Commit

Permalink
Update populator.py
Browse files Browse the repository at this point in the history
Adding reset capabilities to allow reusing populator in tests
  • Loading branch information
DavidSMills committed Dec 31, 2016
1 parent 71186e5 commit 4c63929
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion django_faker/populator.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,15 @@ def __init__(self, generator):
self.entities = {}
self.quantities = {}
self.orders = []



def reset(self):
"""
:param generator: Generator
"""
self.entities = {}
self.quantities = {}
self.orders = []

def addEntity(self, model, number, customFieldFormatters=None):
"""
Expand Down

0 comments on commit 4c63929

Please sign in to comment.