Files
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

34 lines
819 B
Python

import unittest
from app import app
class PricingServiceTests(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)
self.assertEqual(
response.get_json()["status"],
"healthy"
)
def test_pricing_endpoint(self):
response = self.client.get("/pricing")
self.assertEqual(response.status_code, 200)
data = response.get_json()
self.assertEqual(data["version"], "v1")
self.assertEqual(len(data["plans"]), 3)
self.assertEqual(data["plans"][0]["name"], "Basic")
self.assertEqual(data["plans"][0]["price"], 10)
if __name__ == "__main__":
unittest.main()