Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused imports in tests #3018

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/integration/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def serializer_models(localhost, admin_account):
- unrecognized_neighbor
- auditlog
"""
from nav.models import cabling, event, manage, profiles, rack
from nav.models import cabling, event, manage, rack
from nav.auditlog import models as auditlog

netbox = localhost
Expand Down
1 change: 0 additions & 1 deletion tests/integration/bin_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
import sys
import subprocess


Expand Down
1 change: 0 additions & 1 deletion tests/integration/models/alert_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from nav.alertengine.dispatchers import InvalidAlertAddressError
from nav.models.profiles import (
Account,
AccountAlertQueue,
AlertAddress,
AlertProfile,
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/models/fields_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

from datetime import datetime as dt

from django.db import models

from nav.tests.cases import DjangoTransactionTestCase
from nav.models.msgmaint import MaintenanceComponent, MaintenanceTask
from nav.models.event import Subsystem
from nav.models.logger import ErrorError
from nav.models.fields import LegacyGenericForeignKey


class LegacyGenericForeignKeyTest(DjangoTransactionTestCase):
Expand Down
4 changes: 0 additions & 4 deletions tests/integration/models/netbox_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import pytest

from nav.models.manage import (
ManagementProfile,
NetboxProfile,
NetboxEntity,
Netbox,
Device,
Expand Down
1 change: 0 additions & 1 deletion tests/integration/web/info_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from django.urls import reverse
from mock import MagicMock

from nav.models.profiles import Account
from nav.web.info.images.utils import save_thumbnail
from nav.web.info.room.views import create_csv
from nav.web.info.searchproviders import SearchProvider
Expand Down
1 change: 0 additions & 1 deletion tests/integration/web/templatesyntax_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from os.path import join, relpath
from django.conf import settings
from django.template import loader
from django.template.loaders import app_directories

from nav.eventengine.alerts import (
ensure_alert_templates_are_available,
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/widget_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from nav.web.navlets.roomstatus import RoomStatus
from nav.web.navlets.feedreader import FeedReaderNavlet
from nav.models.event import AlertHistory, AlertHistoryMessage
from nav.models.profiles import AccountDashboard, AccountNavlet
from nav.models.profiles import AccountNavlet
from nav.models.fields import INFINITY

import pytest
Expand Down
1 change: 0 additions & 1 deletion tests/unittests/api/api_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from mock import Mock

from nav.web.api.v1.auth import TokenPermission

Expand Down
1 change: 0 additions & 1 deletion tests/unittests/general/logengine_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import datetime
import pytest
from mock import Mock
from unittest import TestCase
import random
import logging

Expand Down
1 change: 0 additions & 1 deletion tests/unittests/ipdevpoll/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# pylint: disable=C0111
"""Tests for config module"""

import unittest
from configparser import NoOptionError

import pytest
Expand Down
1 change: 0 additions & 1 deletion tests/unittests/ipdevpoll/descrparsers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
"""Unit tests for descrparser module."""

import unittest

from nav.ipdevpoll import descrparsers

Expand Down
1 change: 0 additions & 1 deletion tests/unittests/ipdevpoll/mibs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# License along with NAV. If not, see <http://www.gnu.org/licenses/>.
#

import os
import datetime
from IPy import IP

Expand Down
1 change: 0 additions & 1 deletion tests/unittests/snmptrapd/weathergoose_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from unittest import TestCase
from mock import patch, Mock
import pytest

Expand Down
1 change: 0 additions & 1 deletion tests/unittests/statemon/icmp_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from nav.statemon.icmppacket import PacketV6, PacketV4, inet_checksum
import os


class TestICMPPacket:
Expand Down
1 change: 0 additions & 1 deletion tests/unittests/watchdog/tests_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
"""Tests for the WatchDog tests..."""

from unittest import TestCase
from mock import Mock, patch
from datetime import datetime, timedelta

Expand Down
1 change: 0 additions & 1 deletion tests/unittests/web/sortedstats/sortedstatsconfig_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from mock import patch
import mock
from unittest import TestCase
from nav.web.sortedstats.config import SortedStatsConfig

Expand Down
1 change: 0 additions & 1 deletion tests/unittests/web/webfront_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from mock import Mock
from nav.web.webfront.utils import split_tools, Tool


Expand Down
Loading