def test_it_redirects_to_user_activity_page(self, pyramid_request): pyramid_request.matchdict['user'] = '******' with pytest.raises(httpexceptions.HTTPFound) as exc: main.stream_user_redirect(pyramid_request) assert exc.value.location == 'http://example.com/user/bob'
def test_it_extracts_username_from_account_id(self, pyramid_request): pyramid_request.matchdict['user'] = '******' with pytest.raises(httpexceptions.HTTPFound) as exc: main.stream_user_redirect(pyramid_request) assert exc.value.location == 'http://example.com/user/bob'
def test_it_redirects_to_user_activity_page(self, pyramid_request): pyramid_request.matchdict["user"] = "******" with pytest.raises(httpexceptions.HTTPFound) as exc: main.stream_user_redirect(pyramid_request) assert exc.value.location == "http://example.com/user/bob"
def test_doesnt_choke_on_invalid_userids(self, pyramid_request): pyramid_request.matchdict['user'] = '******' with pytest.raises(httpexceptions.HTTPFound) as exc: main.stream_user_redirect(pyramid_request) assert exc.value.location == 'http://example.com/user/acct%3Abob'
def test_doesnt_choke_on_invalid_userids(self, pyramid_request): pyramid_request.matchdict["user"] = "******" with pytest.raises(httpexceptions.HTTPFound) as exc: main.stream_user_redirect(pyramid_request) assert exc.value.location == "http://example.com/user/acct:bob"
def test_it_extracts_username_from_account_id(self, pyramid_request): pyramid_request.matchdict["user"] = "******" with pytest.raises(httpexceptions.HTTPFound) as exc: main.stream_user_redirect(pyramid_request) assert exc.value.location == "http://example.com/user/bob"
def test_it_extracts_username_from_account_id(self, pyramid_request): pyramid_request.feature.flags['search_page'] = True pyramid_request.matchdict['user'] = '******' with pytest.raises(httpexceptions.HTTPFound) as exc: main.stream_user_redirect(pyramid_request) assert exc.value.location == 'http://example.com/user/bob/search'
def test_it_redirects_to_user_activity_page(self, pyramid_request): pyramid_request.feature.flags['search_page'] = True pyramid_request.matchdict['user'] = '******' with pytest.raises(httpexceptions.HTTPFound) as exc: main.stream_user_redirect(pyramid_request) assert exc.value.location == 'http://example.com/user/bob/search'
def test_it_redirects_to_stream(self, pyramid_request): pyramid_request.matchdict['user'] = '******' with pytest.raises(httpexceptions.HTTPFound) as exc: main.stream_user_redirect(pyramid_request) assert exc.value.location == 'http://example.com/stream?q=user%3Abob'