完成极速成品和脚本优化
This commit is contained in:
@@ -231,15 +231,6 @@ class PricingEngineTests(TestCase):
|
||||
# 多单位(单图批量按张)
|
||||
self.assertEqual(quote_flat(self.text_model, units=3).points, Decimal("30"))
|
||||
|
||||
def test_video_digest_is_fixed_thirty_not_model_unit_price(self):
|
||||
from apps.billing.pricing import VIDEO_DIGEST_POINTS, quote_video_digest
|
||||
|
||||
self.assertEqual(VIDEO_DIGEST_POINTS, Decimal("30"))
|
||||
quote = quote_video_digest(model_config=self.text_model)
|
||||
self.assertEqual(quote.points, Decimal("30"))
|
||||
self.assertEqual(quote.meta["rule"], "video_digest_flat")
|
||||
self.assertEqual(quote.meta["unit_points"], "30")
|
||||
|
||||
def test_flat_fallback_when_unit_price_unset(self):
|
||||
from apps.billing.pricing import FLAT_FALLBACK_POINTS, quote_flat
|
||||
|
||||
@@ -423,14 +414,6 @@ class TeamPriceMultiplierTests(TestCase):
|
||||
# meta.rate 是汇率快照契约:create_ai_task 落 payload.points_per_yuan_snapshot,毛利报表用它防汇率漂移
|
||||
self.assertEqual(Decimal(quote.meta["rate"]), Decimal("10"))
|
||||
|
||||
def test_video_digest_applies_multiplier_to_feature_price(self):
|
||||
from apps.billing.pricing import quote_video_digest
|
||||
|
||||
# 30 × 0.8 = 24;不跟模型 unit_price=20
|
||||
quote = quote_video_digest(team=self.team, model_config=self.image_model)
|
||||
self.assertEqual(quote.points, Decimal("24"))
|
||||
self.assertEqual(quote_video_digest().points, Decimal("30"))
|
||||
|
||||
def test_two_step_rounding(self):
|
||||
from apps.billing.pricing import quote_video_from_cost
|
||||
|
||||
|
||||
Reference in New Issue
Block a user