Move xnet/accounts to xnet/groups
[xnet] / xnet / accounts / factories.py
CommitLineData
53722fb0
BG
1# -*- coding: utf-8 -*-
2
3import factory
4
5from . import models
6
7
53722fb0
BG
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)
95fa5c13 14 password = factory.PostGenerationMethodCall('set_password', '')
53722fb0
BG
15 is_staff = True
16
53722fb0
BG
17
18class SuperAccountFactory(AccountFactory):
19 is_superuser = True