Augmentation du timeout et correction des tests
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2025-01-04 12:54:08 +01:00
parent 881b39bb2d
commit 3fed441a5b
6 changed files with 17 additions and 5 deletions

View File

@@ -1,4 +0,0 @@

16
tests/test_scan_ip.py Normal file
View File

@@ -0,0 +1,16 @@
import sys
import os
# Ajoute le chemin racine du projet
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
# tests/test_scan_ip.py
from scan_ip import check_port
def test_check_port():
# Test avec une adresse IP où le port 80 est fermé
assert not check_port("127.0.0.1", 80)
# Test avec une adresse IP et un port connu pour être ouvert (Google DNS)
assert check_port("8.8.8.8", 53)