Compare commits
No commits in common. "0a3837d1e197c37062e5f16b94fbb1c251054932" and "0e88a8d13ea600da025face7a99c61daa279ea09" have entirely different histories.
0a3837d1e1
...
0e88a8d13e
2 changed files with 8 additions and 4 deletions
|
@ -2,7 +2,7 @@ name: Django Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: ["*"]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -31,4 +31,4 @@ jobs:
|
||||||
-w /app \
|
-w /app \
|
||||||
-e SECRET_KEY=dummysecretkey \
|
-e SECRET_KEY=dummysecretkey \
|
||||||
website:test \
|
website:test \
|
||||||
sh -c 'uv run --extra dev manage.py migrate --noinput && uv run --extra dev manage.py test hub.services.tests --verbosity=2'
|
sh -c 'uv run --extra dev manage.py migrate --noinput && uv run --extra dev manage.py test hub.services.tests --verbosity=2'
|
|
@ -1,5 +1,6 @@
|
||||||
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
|
||||||
|
|
||||||
|
@ -9,12 +10,16 @@ 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,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -158,8 +163,7 @@ class PricingEdgeCasesTestCase(TestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Should return None when price doesn't exist
|
# Should return None when price doesn't exist
|
||||||
# For BASE_FEE addons, service_level is required
|
price = addon.get_price(Currency.CHF)
|
||||||
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):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue