def test_handle_redirect(self): resp = self.client.get(build_redirect_url('dummy:ou812')) assert resp.status_code == 302 assert resp['Location'] == 'http://example.com/ou812'
def test_nothing_handled_it_404(self): resp = self.client.get(build_redirect_url('notdummy:ou812')) assert resp.status_code == 404
def test_handle_redirect(self): resp = self.client.get(build_redirect_url('dummy:ou812')) eq_(resp.status_code, 302) eq_(resp['Location'], 'http://example.com/ou812')