'Test page with login at /admin/user/add'

def test_core_user_add(self):

    name = 'newuser'
    password = 'newuserpsw'
    data = {'name': name, 'password': password, 'password_again': password}
    response = self.client.post(path=reverse('core_admin_user_add'), data=data)
    self.assertEquals(response.status_code, 302)
    profile = User.objects.get(name=name)
    self.assertEquals(profile.name, name)
    self.assertRedirects(response, reverse('core_admin_user_view', args=[profile.id]))
    self.assertEquals(self.client.login(username=name, password=password), True)
    self.client.logout()
    response = self.client.post('/accounts/login', {'username': name, 'password': password})
    self.assertRedirects(response, '/')
