mirror of
https://github.com/langgenius/dify.git
synced 2026-10-24 12:04:30 +08:00
fix(web): render workspace plan badge during SSR (#40581)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
import pytest
|
||||
from pydantic import ValidationError
|
||||
|
||||
from services.entities.feature_entities import LicenseLimitationModel
|
||||
from enums import CloudPlan
|
||||
from services.entities.feature_entities import LicenseLimitationModel, SubscriptionModel
|
||||
|
||||
|
||||
def test_subscription_model_uses_the_cloud_plan_value_set() -> None:
|
||||
subscription = SubscriptionModel(plan="team")
|
||||
|
||||
assert subscription.plan is CloudPlan.TEAM
|
||||
|
||||
with pytest.raises(ValidationError):
|
||||
SubscriptionModel(plan="unknown")
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import cast
|
||||
from unittest.mock import patch
|
||||
|
||||
from enums import DeploymentEdition
|
||||
from enums import CloudPlan, DeploymentEdition
|
||||
from services.billing_service import BillingInfo
|
||||
from services.entities.feature_entities import LimitationModel
|
||||
from services.feature_service import FeatureService
|
||||
@@ -11,7 +11,7 @@ def test_get_features_exclude_vector_space_sets_vector_space_to_none():
|
||||
tenant_id = "tenant-id"
|
||||
billing_info = {
|
||||
"enabled": True,
|
||||
"subscription": {"plan": "pro", "interval": "monthly", "education": False},
|
||||
"subscription": {"plan": CloudPlan.PROFESSIONAL, "interval": "monthly", "education": False},
|
||||
"members": {"size": 1, "limit": 10},
|
||||
"apps": {"size": 2, "limit": 20},
|
||||
"documents_upload_quota": {"size": 3, "limit": 100},
|
||||
|
||||
Reference in New Issue
Block a user