def assert_redirects(self, request, location, status_code=None):
        """Assert that a request redirects"""
        if status_code is not None:
            assert request.status_code == status_code
        else:
            assert request.status_code in (301, 302, 303)
        assert request.location == location
dataset/ETHPy150Open danielholmstrom/flask-alchemyview/tests/test_view.py/TestSimpleModel.assert_redirects/original