Move xnet/accounts to xnet/groups
[xnet] / xnet / accounts / factories.py
... / ...
CommitLineData
1# -*- coding: utf-8 -*-
2
3import factory
4
5from . import models
6
7
8class AccountFactory(factory.DjangoModelFactory):
9 FACTORY_FOR = models.Account
10
11 username = factory.Sequence('mr_robinson{0}'.format)
12 first_name = u"John"
13 last_name = factory.Sequence(lambda n: u"D%se" % ((n % 10) * u"o"), type=int)
14 password = factory.PostGenerationMethodCall('set_password', '')
15 is_staff = True
16
17
18class SuperAccountFactory(AccountFactory):
19 is_superuser = True