Skip to content

Commit 88b3107

Browse files
Maffoochclaude
andcommitted
chore(lint): hoist test imports to module top for CI ruff (PLC0415)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 772a140 commit 88b3107

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

unittests/test_location_data.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
from unittest.mock import MagicMock
2+
13
from django.utils import timezone
24

35
from dojo.models import Engagement, Finding, Product, Product_Type, Test, Test_Type
46
from dojo.tools.locations import LocationData
7+
from dojo.url.models import URL
58
from unittests.dojo_test_case import DojoTestCase, skip_unless_v3
69

710

@@ -85,10 +88,6 @@ def test_raw_abstract_location_instances_are_filtered_by_type(self):
8588
reaches the hash comprehension — without the type filter it leaks
8689
into the endpoints ingredient and drifts the pre-save hash.
8790
"""
88-
from unittest.mock import MagicMock
89-
90-
from dojo.url.models import URL
91-
9291
dependency_location = MagicMock(spec=URL)
9392
dependency_location.get_location_type.return_value = "dependency"
9493
dependency_location.get_location_value.return_value = "pkg:npm/lodash@4.17.21"

0 commit comments

Comments
 (0)