Skip to content

Commit

Permalink
deepsource
Browse files Browse the repository at this point in the history
  • Loading branch information
federicofantini committed Sep 25, 2024
1 parent 4424855 commit 1f510d8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 1 addition & 3 deletions api_app/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ def _vt_intelligence_search(
) -> Dict:
logger.info(f"Running VirusTotal intelligence search query: {query}")

if limit > 300:
limit = 300 # this is a limit forced by VT service

limit = min(limit, 300) # this is a limit forced by VT service
params = {
"query": query,
"limit": limit,
Expand Down
11 changes: 11 additions & 0 deletions tests/api_app/test_mixins.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl
# See the file 'LICENSE' for copying permission.
import pathlib
from pathlib import PosixPath

from api_app.analyzers_manager.constants import ObservableTypes
Expand All @@ -11,7 +12,12 @@

class VirusTotalv3Base(VirusTotalv3BaseMixin):
@classmethod
@property
def python_base_path(cls) -> PosixPath:
return pathlib.PosixPath(r"/")

@classmethod
def update(cls) -> bool:
pass

def run(self) -> dict:
Expand All @@ -20,7 +26,12 @@ def run(self) -> dict:

class VirusTotalv3Analyzer(VirusTotalv3AnalyzerMixin):
@classmethod
@property
def python_base_path(cls) -> PosixPath:
return pathlib.PosixPath(r"/")

@classmethod
def update(cls) -> bool:
pass

def run(self) -> dict:
Expand Down

0 comments on commit 1f510d8

Please sign in to comment.