From 0651d2bc83619dd90442c6ed7d238b14c3386069 Mon Sep 17 00:00:00 2001 From: Chris Wynne Date: Fri, 22 Sep 2017 09:01:10 +0100 Subject: [PATCH] Remove old redirect for user creation Supplier creation was moved to the user app. Any tokens created before the move will have linked to the supplier app still. Tokens are valid for one week, so we needed to maintain the functionality of those tokens by keeping a redirect on the old route to the user app. It's been over a week so all tokens will now link to the user app. We can remove this redirect and associate test. --- app/main/views/login.py | 7 ------- tests/app/main/test_login.py | 7 ------- 2 files changed, 14 deletions(-) diff --git a/app/main/views/login.py b/app/main/views/login.py index 97d7736bf..344d1cae7 100644 --- a/app/main/views/login.py +++ b/app/main/views/login.py @@ -11,13 +11,6 @@ from ... import data_api_client -# Any invites sent before the new user-frontend becomes active will be linking to this route. We need to maintain it -# for seven days after the user-frontend goes live. -@main.route('/create-user/', methods=['GET']) -def create_user(encoded_token): - return redirect(url_for('external.create_user', encoded_token=encoded_token), 301) - - @main.route('/invite-user', methods=["GET"]) @login_required def invite_user(): diff --git a/tests/app/main/test_login.py b/tests/app/main/test_login.py index 0f9bb5b12..6bd190a86 100644 --- a/tests/app/main/test_login.py +++ b/tests/app/main/test_login.py @@ -13,13 +13,6 @@ EMAIL_INVALID_ERROR = "Please enter a valid email address" -class TestCreateUser(BaseApplicationTest): - def test_should_redirect_to_the_user_frontend_app(self): - res = self.client.get('/suppliers/create-user/1234567890') - assert res.status_code == 301 - assert res.location == 'http://localhost/user/create/1234567890' - - class TestSupplierRoleRequired(BaseApplicationTest): def test_buyer_cannot_access_supplier_dashboard(self): with self.app.app_context():