style: sort imports in remaining tests and scripts

This commit is contained in:
Mark Paronyan committed 2026-10-02 12:43:26 +03:00
1 parent 6d16d923c7
commit 83e7fbe63b
22 files changed
+68 -65

No files matched your search

-1
View File
@@ -6,7 +6,6 @@ import pytest
from gns3server.utils.asyncio.ssh_server import AsyncioSSHServer
# ---------------------------------------------------------------------------
# Helpers
# ---------------------------------------------------------------------------
+2 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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):
+3 -4
View File
@@ -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"])
+1 -1
View File
@@ -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
+4 -3
View File
@@ -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,
)
+1 -1
View File
@@ -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