def test_login(self):
    url = reverse('users.user_login')
    response = self.url_post(None, url, {'username': 'example@example.com', 'password': 'example@example.com'})
    self.assertRedirects(response, 'http://testserver/', fetch_redirect_response=False)
    response = self.url_post('unicef', url, {'username': 'example@example.com', 'password': 'example@example.com'})
    self.assertRedirects(response, 'http://unicef.testserver/', fetch_redirect_response=False)
def test_login(self):
    url = reverse('users.user_login')
    response = self.url_post(None, url, {'username': 'example@example.com', 'password': 'example@example.com'})
    self.assertRedirects(response, 'http://testserver/', fetch_redirect_response=False)
    response = self.url_post('unicef', url, {'username': 'example@example.com', 'password': 'example@example.com'})
    self.assertRedirects(response, 'http://unicef.testserver/', fetch_redirect_response=False)