"http" self.host = "agus.tinproject.es" def get(self, location, **kwargs): url = "{}://{}{}".format(self.scheme, self.host, location) return requests.get(url, allow_redirects=False, **kwargs) return Client() @pytest.mark.parametrize("endpoint, status", [ ("/", 200), ("/category/gis", 301), ("/admin", 302), ]) def test__blog_endpoints(endpoint, status, blog): r = blog.get(endpoint) assert r.status_code == status