Refactor authentication routes to use '/auth' prefix in API calls
All checks were successful
Chore App Build and Push Docker Images / build-and-push (push) Successful in 38s
All checks were successful
Chore App Build and Push Docker Images / build-and-push (push) Successful in 38s
This commit is contained in:
@@ -28,7 +28,7 @@ def add_test_user():
|
||||
})
|
||||
|
||||
def login_and_set_cookie(client):
|
||||
resp = client.post('/login', json={"email": TEST_EMAIL, "password": TEST_PASSWORD})
|
||||
resp = client.post('/auth/login', json={"email": TEST_EMAIL, "password": TEST_PASSWORD})
|
||||
assert resp.status_code == 200
|
||||
token = resp.headers.get("Set-Cookie")
|
||||
assert token and "token=" in token
|
||||
@@ -37,7 +37,7 @@ def login_and_set_cookie(client):
|
||||
def client():
|
||||
app = Flask(__name__)
|
||||
app.register_blueprint(reward_api)
|
||||
app.register_blueprint(auth_api)
|
||||
app.register_blueprint(auth_api, url_prefix='/auth')
|
||||
app.config['TESTING'] = True
|
||||
app.config['SECRET_KEY'] = 'supersecretkey'
|
||||
with app.test_client() as client:
|
||||
|
||||
Reference in New Issue
Block a user