input: Write a function that implements a web server in Python using the Flask framework to serve a JSON object containing the current temperature for a city based on the city name provided in the request. If the city name is not provided or the request is invalid, return an appropriate error message. If the city name is valid and the temperature is successfully retrieved, return a JSON object with the temperature. Define the function with a Flask route '/getTemp' that accepts POST requests and assert cases to verify the function's behavior.
  
  assert get_temp('London') == {'temperature': 280.32}
  assert get_temp('New York') == {'temperature': 274.55}
  assert get_temp('') == {'error': 'City name not provided'}
  assert get_temp('InvalidCity') == {'error': 'City not found'}
output: 
  @app.route('/getTemp', methods=['POST'])
  def get_temp():
      city = request.form.get('city')
      if not city:
          return jsonify({'error': 'City name not provided'}), 400
      temperatures = {
          'London': 280.32,
          'New York': 274.55
      }
      if city in temperatures:
          return jsonify({'temperature': temperatures[city]})
      else:
          return jsonify({'error': 'City not found'}), 404
  