def setUp(self):
     self.superuser = User.objects.create_superuser(
         'superuser', '*****@*****.**', 'password'
     )
     self.user = User.objects.create_user(
         'user', '*****@*****.**', 'password'
     )
     self.su_domain = DomainFactory(
         name='su.example.com',
         owner=self.superuser,
     )
     self.u_domain = DomainFactory(
         name='u.example.com',
         owner=self.user,
     )
     self.su_record = RecordFactory(
         domain=self.su_domain,
         name='www.su.example.com',
         type='A',
         content='192.168.1.1',
         owner=self.superuser,
         auto_ptr=AutoPtrOptions.NEVER,
     )
     self.u_record = RecordFactory(
         domain=self.u_domain,
         name='www.u.example.com',
         type='A',
         content='192.168.1.2',
         owner=self.user,
         auto_ptr=AutoPtrOptions.NEVER,
     )
     self.su_client = user_client(self.superuser)
     self.u_client = user_client(self.user)
 def setUp(self):
     self.superuser = User.objects.create_superuser(
         'superuser', '*****@*****.**', 'password')
     self.user = User.objects.create_user('user', '*****@*****.**',
                                          'password')
     self.su_domain = DomainFactory(
         name='su.example.com',
         owner=self.superuser,
     )
     self.u_domain = DomainFactory(
         name='u.example.com',
         owner=self.user,
     )
     self.su_record = RecordFactory(
         domain=self.su_domain,
         name='www.su.example.com',
         type='A',
         content='192.168.1.1',
         owner=self.superuser,
         auto_ptr=AutoPtrOptions.NEVER,
     )
     self.u_record = RecordFactory(
         domain=self.u_domain,
         name='www.u.example.com',
         type='A',
         content='192.168.1.2',
         owner=self.user,
         auto_ptr=AutoPtrOptions.NEVER,
     )
     self.su_client = user_client(self.superuser)
     self.u_client = user_client(self.user)
 def setUp(self):
     self.user1 = User.objects.create_superuser(
         'user1', '*****@*****.**', 'password'
     )
     self.user2 = User.objects.create_superuser(
         'user2', '*****@*****.**', 'password'
     )
     self.client = user_client(self.user1)
     mail.outbox = []
 def setUp(self):
     self.user1 = User.objects.create_superuser('user1',
                                                '*****@*****.**',
                                                'password')
     self.user2 = User.objects.create_superuser('user2',
                                                '*****@*****.**',
                                                'password')
     self.client = user_client(self.user1)
     mail.outbox = []