import pytest

from flask import Flask, jsonify


@pytest.fixture
def app():
    app = Flask(__name__)

    @app.route('/ping')
    def ping():
        return jsonify(ping='pong')

    return app

import pytest

from flask import Flask, jsonify


@pytest.fixture
def app():
    app = Flask(__name__)

    @app.route('/')
    def index():
        return app.response_class('OK')

    @app.route('/ping')
    def ping():
        return jsonify(ping='pong')

    return app

Add index route to test application
Add index route to test application

This endpoint uses to start :class:`LiveServer` instance with minimum
waiting timeout.

  import pytest
  
  from flask import Flask, jsonify
  
  
  @pytest.fixture
  def app():
      app = Flask(__name__)
  
+     @app.route('/')
+     def index():
+         return app.response_class('OK')
+ 
      @app.route('/ping')
      def ping():
          return jsonify(ping='pong')
  
      return app
  
Add index route to test application
## Code Before:
import pytest

from flask import Flask, jsonify


@pytest.fixture
def app():
    app = Flask(__name__)

    @app.route('/ping')
    def ping():
        return jsonify(ping='pong')

    return app

## Instruction:
Add index route to test application
## Code After:
import pytest

from flask import Flask, jsonify


@pytest.fixture
def app():
    app = Flask(__name__)

    @app.route('/')
    def index():
        return app.response_class('OK')

    @app.route('/ping')
    def ping():
        return jsonify(ping='pong')

    return app
