diff --git a/social/tests/models.py b/social/tests/models.py index d5d193c2c..d142d9260 100644 --- a/social/tests/models.py +++ b/social/tests/models.py @@ -24,7 +24,7 @@ class User(BaseModel): cache = {} _is_active = True - def __init__(self, username, email=None): + def __init__(self, username, email=None, **extra_user_fields): self.id = User.next_id() self.username = username self.email = email @@ -32,6 +32,7 @@ def __init__(self, username, email=None): self.slug = None self.social = [] self.extra_data = {} + self.extra_user_fields = extra_user_fields self.save() def is_active(self): @@ -100,8 +101,8 @@ def user_exists(cls, username): return User.cache.get(username) is not None @classmethod - def create_user(cls, username, email=None): - return User(username=username, email=email) + def create_user(cls, username, email=None, **extra_user_fields): + return User(username=username, email=email, **extra_user_fields) @classmethod def get_user(cls, pk):