Files
startup-product/pricing-service/versions/v2/test_app.py
T
nageshwaran_manikumar 36cec81744
startup-product-gitea-ci/pipeline/pr-main There was a failure building this commit
startup-product-gitea-ci/pipeline/head There was a failure building this commit
feat: complete secure pricing delivery and rollback documentation
2026-11-13 21:07:53 -05:00

33 lines
856 B
Python

import unittest
from app import app
class PricingServiceV2Tests(unittest.TestCase):
def setUp(self):
self.client = app.test_client()
def test_health_endpoint(self):
response = self.client.get("/health")
self.assertEqual(response.status_code, 200)
data = response.get_json()
self.assertEqual(data["status"], "healthy")
self.assertEqual(data["version"], "v2")
def test_pricing_endpoint(self):
response = self.client.get("/pricing")
self.assertEqual(response.status_code, 200)
data = response.get_json()
self.assertEqual(data["version"], "v2")
self.assertEqual(len(data["plans"]), 4)
self.assertEqual(data["plans"][0]["name"], "Starter")
self.assertEqual(data["plans"][0]["price"], 5)
if __name__ == "__main__":
unittest.main()