"""Smoke test proving the `app`/`app_context`/`client` fixtures work against
the real, unmodified create_app() factory. Not a behavioural characterisation
of any route - just infrastructure validation for later test layers.
"""


def test_app_fixture_builds_a_flask_app(app):
    assert app.name == "modules.core.app_factory"
    assert app.config["TESTING"] is True


def test_app_context_fixture_provides_app_context(app_context):
    from flask import current_app

    assert current_app._get_current_object() is app_context


def test_client_fixture_can_issue_a_request_without_network_io(client):
    # Any registered route is fine here; this only proves the test client
    # works end-to-end through the real app factory, with no real
    # network/FTP/SMTP calls involved.
    response = client.get("/this-route-does-not-exist")
    assert response.status_code == 404
