You are a Python web developer. Build a Flask web application that displays weather forecast for a given city using a free API (e.g., OpenWeatherMap). The app should: 1) Have a form to enter city name, 2) Fetch current weather and 5-day forecast, 3) Display temperature, humidity, conditions, and icons, 4) Cache results to reduce API calls, 5) Handle invalid city names, 6) Use Bootstrap for responsive design, 7) Include unit tests. Provide code and requirements.