'A simpler version of assertLoginRedirects that just checks that we
get the matched status code and bounced to the correct login page.'

def assertLoginRequired(self, response, status_code=302):

    assert (response.status_code == status_code), ('Response    returned:    %s,    expected:    %s' % (response.status_code, status_code))
    path = urlsplit(response['Location'])[2]
    assert (path == reverse('users.login')), ('Redirected    to:    %s,    expected:    %s' % (path, reverse('users.login')))
