mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
style: sort imports in remaining tests and scripts
This commit is contained in:
1 parent
6d16d923c7
commit
83e7fbe63b
22 files changed
+68
-65
No files matched your search
@@ -6,7 +6,6 @@ import pytest
|
||||
|
||||
from gns3server.utils.asyncio.ssh_server import AsyncioSSHServer
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Helpers
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
|
||||
|
||||
import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from gns3server.utils.asyncio import wait_run_in_executor, subprocess_check_output, locking
|
||||
from gns3server.utils.asyncio import locking, subprocess_check_output, wait_run_in_executor
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import pytest
|
||||
import asyncio
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
import pytest
|
||||
|
||||
from gns3server.utils.file_watcher import FileWatcher
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
import pytest
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from gns3server.utils import force_unix_path
|
||||
from gns3server.utils.images import md5sum, remove_checksum, images_directories, list_images
|
||||
from gns3server.utils.images import images_directories, list_images, md5sum, remove_checksum
|
||||
|
||||
|
||||
def test_images_directories(tmpdir, config):
|
||||
|
||||
@@ -14,15 +14,14 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import socket
|
||||
import collections
|
||||
import socket
|
||||
import sys
|
||||
from unittest.mock import patch
|
||||
|
||||
import psutil
|
||||
|
||||
from gns3server.utils.interfaces import interfaces, is_interface_up, has_netmask
|
||||
|
||||
from gns3server.utils.interfaces import has_netmask, interfaces, is_interface_up
|
||||
|
||||
# psutil returns snicaddr namedtuples; mirror that shape for the mocks below.
|
||||
snicaddr = collections.namedtuple("snicaddr", ["family", "address", "netmask", "broadcast", "ptp"])
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import time
|
||||
import asyncio
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@@ -3,11 +3,12 @@ Unit tests for packet filter validation.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from gns3server.utils.packet_filter_validation import (
|
||||
validate_filter_parameters,
|
||||
validate_all_filters,
|
||||
filter_inactive_filters,
|
||||
FilterValidationError,
|
||||
filter_inactive_filters,
|
||||
validate_all_filters,
|
||||
validate_filter_parameters,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
import pytest
|
||||
from fastapi import HTTPException
|
||||
|
||||
from gns3server.utils.path import check_path_allowed, get_default_project_directory
|
||||
|
||||
Reference in new issue
Block a user