Compare commits

..

2 commits

Author SHA1 Message Date
0a3837d1e1
set service level for test
All checks were successful
Django Tests / test (pull_request) Successful in 1m9s
2025-06-23 14:22:52 +02:00
25d4164bae
only run tests on main and PRs 2025-06-23 14:22:33 +02:00
2 changed files with 4 additions and 8 deletions

View file

@ -2,7 +2,7 @@ name: Django Tests
on: on:
push: push:
branches: ["*"] branches: [main]
pull_request: pull_request:
jobs: jobs:

View file

@ -1,6 +1,5 @@
from decimal import Decimal from decimal import Decimal
from django.test import TestCase from django.test import TestCase
from django.core.exceptions import ValidationError
from django.utils import timezone from django.utils import timezone
from datetime import timedelta from datetime import timedelta
@ -10,16 +9,12 @@ from ..models.services import Service
from ..models.pricing import ( from ..models.pricing import (
ComputePlan, ComputePlan,
ComputePlanPrice, ComputePlanPrice,
StoragePlan,
StoragePlanPrice,
ProgressiveDiscountModel, ProgressiveDiscountModel,
DiscountTier, DiscountTier,
VSHNAppCatPrice, VSHNAppCatPrice,
VSHNAppCatBaseFee, VSHNAppCatBaseFee,
VSHNAppCatUnitRate, VSHNAppCatUnitRate,
VSHNAppCatAddon, VSHNAppCatAddon,
VSHNAppCatAddonBaseFee,
VSHNAppCatAddonUnitRate,
ExternalPricePlans, ExternalPricePlans,
) )
@ -163,7 +158,8 @@ class PricingEdgeCasesTestCase(TestCase):
) )
# Should return None when price doesn't exist # Should return None when price doesn't exist
price = addon.get_price(Currency.CHF) # For BASE_FEE addons, service_level is required
price = addon.get_price(Currency.CHF, service_level="standard")
self.assertIsNone(price) self.assertIsNone(price)
def test_compute_plan_with_validity_dates(self): def test_compute_plan_with_validity_dates(self):