test_app.py 500 B

12345678910111213141516171819
  1. """Test Flask application setup."""
  2. import pytest
  3. def test_app_creation(app):
  4. """Test that the app is created successfully."""
  5. assert app is not None
  6. assert app.config['TESTING'] is True
  7. def test_app_has_swagger_docs(client):
  8. """Test that Swagger documentation is accessible."""
  9. response = client.get('/api/docs')
  10. assert response.status_code == 200
  11. def test_database_setup(db_session):
  12. """Test that database is set up correctly."""
  13. assert db_session is not None