Commit 19f1a3e8 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files


parent 6546d00d
......@@ -2,7 +2,7 @@ from django.urls import reverse
from django.test import TestCase
from .forms import UserForm, ProfileForm
from adhesion.models import User
from adhesions.models import User
class ViewsTestCase(TestCase):
......@@ -8,7 +8,7 @@ from import CommandError
from io import StringIO
from adhesions.models import Adhesion, Corporation, User
from .models import Service, ServiceType, IPResource, ResourceAllocation
from .models import Service, ServiceType, IPResource, ServiceAllocation
class ServicesMixin:
......@@ -41,9 +41,7 @@ class ServicesMixin:
adhesion=adh_c2, service_type=stype1, label="Service 4", active=False
ip1 = IPResource.objects.create(ip="")
resource=ip1, service=s1,
ServiceAllocation.objects.create(resource=ip1, service=s1,
IPResource.objects.create(ip="", mask=32)
......@@ -127,7 +125,7 @@ class ViewsTestCase(ServicesMixin, TestCase):
def test_deallocate(self):
ip1 = IPResource.objects.get(ip="")
ip2 = IPResource.objects.get(ip="")
allocation = ResourceAllocation.objects.get(resource=ip1)
allocation = ServiceAllocation.objects.get(resource=ip1)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment