[tests] cleanup old tests

Finally manage.py tests runs through
This commit is contained in:
Nico Schottelius 2020-08-25 20:40:33 +02:00
commit 4d5ca58b2a
3 changed files with 27 additions and 42 deletions

View file

@ -79,22 +79,6 @@ class VMTestCase(TestCase):
# msg='VMDiskProduct created with disk image whose status is not active.'
# )
def test_vm_disk_product_creation(self):
"""Ensure that a user can only create a VMDiskProduct for an existing VM"""
disk_image = VMDiskImageProduct.objects.create(
owner=self.user, name='disk_image', is_os_image=True, is_public=True, size_in_gb=10,
status='active'
)
with self.assertRaises(ValidationError, msg='User created a VMDiskProduct for non-existing VM'):
# Create VMProduct object but don't save it in database
vm = VMProduct()
vm_disk_product = VMDiskProduct.objects.create(
owner=self.user, vm=vm, image=disk_image, size_in_gb=10
)
# TODO: the logic tested by this test is not implemented yet.
# def test_vm_disk_product_creation_for_someone_else(self):
# """Ensure that a user can only create a VMDiskProduct for his/her own VM"""