def test_cors_auth(client: FlaskClient): response = client.options('/api/v1/auth/token', json={}) assert response.status_code == 200 and response.headers[ 'Access-Control-Allow-Origin'] == allow_origin response = client.options('/api/v1/auth/register', json={}) assert response.status_code == 200 and response.headers[ 'Access-Control-Allow-Origin'] == allow_origin response = client.options('/api/v1/auth/reset_password', json={}) assert response.status_code == 200 and response.headers[ 'Access-Control-Allow-Origin'] == allow_origin
def test_cors_menu(client: FlaskClient): response = client.options('/api/v1/menus', json={}) assert response.status_code == 200 and response.headers[ 'Access-Control-Allow-Origin'] == allow_origin
def test_cors_on_(client: FlaskClient): response = client.options('/api/v1', json={}) assert response.status_code == 404