forked from extern/django-helpdesk
Fix import sorting
This commit is contained in:
parent
0ae288374c
commit
9e3a3abcf1
@ -7,6 +7,7 @@ See LICENSE for details.
|
|||||||
|
|
||||||
# import base64
|
# import base64
|
||||||
|
|
||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from django.conf import settings as django_settings
|
from django.conf import settings as django_settings
|
||||||
@ -17,10 +18,11 @@ from django.db.models import Q
|
|||||||
from django.utils import encoding, timezone
|
from django.utils import encoding, timezone
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
import email
|
import email
|
||||||
|
from email.message import Message
|
||||||
from email.utils import getaddresses
|
from email.utils import getaddresses
|
||||||
from email_reply_parser import EmailReplyParser
|
from email_reply_parser import EmailReplyParser
|
||||||
from helpdesk import settings
|
from helpdesk import settings
|
||||||
from helpdesk.exceptions import IgnoreTicketException, DeleteIgnoredTicketException
|
from helpdesk.exceptions import DeleteIgnoredTicketException, IgnoreTicketException
|
||||||
from helpdesk.lib import process_attachments, safe_template_context
|
from helpdesk.lib import process_attachments, safe_template_context
|
||||||
from helpdesk.models import FollowUp, IgnoreEmail, Queue, Ticket
|
from helpdesk.models import FollowUp, IgnoreEmail, Queue, Ticket
|
||||||
import imaplib
|
import imaplib
|
||||||
@ -35,8 +37,7 @@ import ssl
|
|||||||
import sys
|
import sys
|
||||||
from time import ctime
|
from time import ctime
|
||||||
import typing
|
import typing
|
||||||
from email.message import Message
|
from typing import List, Tuple
|
||||||
from typing import Tuple, List
|
|
||||||
|
|
||||||
|
|
||||||
# import User model, which may be a custom model
|
# import User model, which may be a custom model
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
from django.contrib.auth.hashers import make_password
|
from django.contrib.auth.hashers import make_password
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||||
from django.core.management import call_command
|
from django.core.management import call_command
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.test import override_settings, TestCase
|
from django.test import override_settings, TestCase
|
||||||
import helpdesk.email
|
import helpdesk.email
|
||||||
|
from helpdesk.email import extract_part_data, object_from_message
|
||||||
|
from helpdesk.exceptions import DeleteIgnoredTicketException, IgnoreTicketException
|
||||||
from helpdesk.management.commands.get_email import Command
|
from helpdesk.management.commands.get_email import Command
|
||||||
from helpdesk.models import FollowUp, FollowUpAttachment, Queue, Ticket, TicketCC,\
|
from helpdesk.models import FollowUp, FollowUpAttachment, IgnoreEmail, Queue, Ticket, TicketCC
|
||||||
IgnoreEmail
|
from helpdesk.tests import utils
|
||||||
import itertools
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -16,12 +20,8 @@ from shutil import rmtree
|
|||||||
import six
|
import six
|
||||||
import sys
|
import sys
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
from unittest import mock
|
|
||||||
from helpdesk.tests import utils
|
|
||||||
from helpdesk.exceptions import DeleteIgnoredTicketException, IgnoreTicketException
|
|
||||||
from helpdesk.email import object_from_message, extract_part_data
|
|
||||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
|
||||||
import typing
|
import typing
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
|
||||||
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
@ -1,23 +1,24 @@
|
|||||||
"""UItility functions facilitate making unit testing easier and less brittle."""
|
"""UItility functions facilitate making unit testing easier and less brittle."""
|
||||||
|
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
import email
|
import email
|
||||||
import factory
|
|
||||||
import faker
|
|
||||||
import random
|
|
||||||
import re
|
|
||||||
import string
|
|
||||||
import typing
|
|
||||||
import unicodedata
|
|
||||||
from email import encoders
|
from email import encoders
|
||||||
from email.message import Message
|
from email.message import Message
|
||||||
from email.mime.base import MIMEBase
|
from email.mime.base import MIMEBase
|
||||||
from email.mime.image import MIMEImage
|
from email.mime.image import MIMEImage
|
||||||
|
from email.mime.multipart import MIMEMultipart
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
|
import factory
|
||||||
|
import faker
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from numpy.random import randint
|
from numpy.random import randint
|
||||||
from PIL import Image
|
import random
|
||||||
from typing import Tuple, Any, Optional
|
import re
|
||||||
from email.mime.multipart import MIMEMultipart
|
import string
|
||||||
|
import typing
|
||||||
|
from typing import Any, Optional, Tuple
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
|
|
||||||
def strip_accents(text):
|
def strip_accents(text):
|
||||||
|
Loading…
Reference in New Issue
Block a user