Compare commits
3 commits
master
...
bugfix/upd
Author | SHA1 | Date | |
---|---|---|---|
|
13cd098c60 | ||
|
bce5905842 | ||
|
215047aee5 |
1 changed files with 9 additions and 2 deletions
|
@ -10,7 +10,7 @@ from django.test import TestCase, override_settings
|
|||
from model_mommy import mommy
|
||||
from unittest import skipIf
|
||||
|
||||
from datacenterlight.models import VMTemplate
|
||||
from datacenterlight.models import VMTemplate, VMPricing
|
||||
from datacenterlight.tasks import create_vm_task
|
||||
from hosting.models import HostingOrder
|
||||
from membership.models import StripeCustomer
|
||||
|
@ -101,6 +101,12 @@ class CeleryTaskTestCase(TestCase):
|
|||
cpu = specs.get('cpu')
|
||||
memory = specs.get('memory')
|
||||
disk_size = specs.get('disk_size')
|
||||
vm_pricing = VMPricing.objects.create(
|
||||
name="default",
|
||||
cores_unit_price=5,
|
||||
ram_unit_price=2,
|
||||
ssd_unit_price=0.6
|
||||
)
|
||||
amount_to_be_charged = get_vm_price(cpu=cpu, memory=memory,
|
||||
disk_size=disk_size)
|
||||
plan_name = StripeUtils.get_stripe_plan_name(cpu=cpu,
|
||||
|
@ -140,7 +146,8 @@ class CeleryTaskTestCase(TestCase):
|
|||
price=specs['price'],
|
||||
vm_id=0,
|
||||
customer=stripe_customer,
|
||||
billing_address=billing_address
|
||||
billing_address=billing_address,
|
||||
vm_pricing=vm_pricing
|
||||
)
|
||||
|
||||
async_task = create_vm_task.delay(
|
||||
|
|
Loading…
Reference in a new issue