Commit 5bfdfc03 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

flake8

parent 25207e72
from django.test import TestCase
from django.contrib.contenttypes.models import ContentType
from django.urls import reverse
from django.core.management import call_command
from django.core.management.base import CommandError
from io import StringIO
from os import devnull
from .models import Corporation, Adhesion, User
......
from django.core.management.base import BaseCommand, CommandParser, CommandError
from django.core.management.base import BaseCommand, CommandError
from django.db.models import DecimalField, F, Sum, Func, Q
from django.core.validators import validate_ipv4_address, validate_ipv6_address
from django.core.exceptions import ValidationError
......@@ -52,8 +52,6 @@ class Command(BaseCommand):
help = "Gestion des services"
def add_arguments(self, parser):
cmd = self
subparsers = parser.add_subparsers(dest="command")
subparsers.required = True
......
from django.core.management.base import BaseCommand, CommandParser, CommandError
from django.core.management.base import BaseCommand, CommandError
from services.models import Service, ServiceType
......@@ -7,8 +7,6 @@ class Command(BaseCommand):
help = "Gestion des types de services"
def add_arguments(self, parser):
cmd = self
subparsers = parser.add_subparsers(dest="command")
subparsers.required = True
......
from django.urls import reverse
from django.test import TestCase
from django.contrib.contenttypes.models import ContentType
from django.utils import timezone
from django.core.management import call_command
from django.core.management.base import CommandError
from io import StringIO
from adhesions.models import Adhesion, Corporation, User
from adhesions.models import Corporation, User
from .models import Service, ServiceType, IPResource, ServiceAllocation, Route
class ServicesMixin:
def setUp(self):
user_ct = ContentType.objects.get_for_model(User)
corp_ct = ContentType.objects.get_for_model(Corporation)
user1 = User.objects.create_user(
"user1", email="user1@example.net", password="user1"
)
......
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