From e96ddc78654ccc2f327f49eee587f6d62973532d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Mar 2026 11:57:37 +0000 Subject: [PATCH] test: increase coverage for app/views/subscriptions.py to 100% Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- tests/test_views_subscriptions.py | 468 ++++++++++++++++++++++++++++++ 1 file changed, 468 insertions(+) create mode 100644 tests/test_views_subscriptions.py diff --git a/tests/test_views_subscriptions.py b/tests/test_views_subscriptions.py new file mode 100644 index 00000000..7428fd9c --- /dev/null +++ b/tests/test_views_subscriptions.py @@ -0,0 +1,468 @@ +"""Tests for app/views/subscriptions.py module. + +Covers: + GET /pricing — public marketing pricing page + GET /subscription — authenticated user's current plan & usage +""" + +from unittest.mock import MagicMock, patch + +import pytest + +# --------------------------------------------------------------------------- +# Integration tests (via TestClient with shared fixtures) +# --------------------------------------------------------------------------- + + +@pytest.mark.integration +class TestPricingView: + """Integration tests for the /pricing route.""" + + def test_pricing_page_returns_200(self, client): + """GET /pricing should return 200.""" + response = client.get("/pricing") + assert response.status_code == 200 + + def test_pricing_page_contains_html(self, client): + """GET /pricing should return HTML content.""" + response = client.get("/pricing") + assert b"