Move xnet/accounts to xnet/groups
[xnet] / xnet / accounts / factories.py
1 # -*- coding: utf-8 -*-
2
3 import factory
4
5 from . import models
6
7
8 class 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
18 class SuperAccountFactory(AccountFactory):
19 is_superuser = True