def test_update_as_non_superuser(self):
    self.login(self.admin)
    url = reverse('profiles.admin_update', args=[self.user1.pk])
    response = self.url_post('unicef', url, dict())
    self.assertEqual(response.status_code, 302)
    self.assertIn('login', response['Location'])
def test_update_as_non_superuser(self):
    self.login(self.admin)
    url = reverse('profiles.admin_update', args=[self.user1.pk])
    response = self.url_post('unicef', url, dict())
    self.assertEqual(response.status_code, 302)
    self.assertIn('login', response['Location'])