import json


def get_client_and_headers(app, user):
  """
    Get request headers and test client instance.
  """

  client = app.test_client()

  headers = {
      "Content-Type": "application/json",
      "X-Requested-By": "GGRC",
      "X-ggrc-user": json.dumps({
          "name": user.name,
          "email": user.email,
      })
  }

  return client, headers