Database, WebSockets, REST API, Basic Front End
This commit is contained in:
BIN
tests/overseer/overseer.sqlite
Normal file
BIN
tests/overseer/overseer.sqlite
Normal file
Binary file not shown.
19
tests/overseer/test_database.py
Normal file
19
tests/overseer/test_database.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import pytest
|
||||
import ipaddress
|
||||
from overseer.database import DatabaseConnector
|
||||
|
||||
def test_create_scan_target():
|
||||
db = DatabaseConnector(None, True)
|
||||
hostname = db.create_scan_target(hostname="google.com")
|
||||
ip_address = db.create_scan_target(ip_addr="1.1.1.1")
|
||||
|
||||
assert hostname.id == 1
|
||||
assert hostname.hostname == "google.com"
|
||||
assert ip_address.id == 2
|
||||
assert ip_address.ip == int(ipaddress.ip_address("1.1.1.1"))
|
||||
|
||||
# def test_get_scan_target():
|
||||
# def test_get_all_scan_target():
|
||||
# def test_create_scan_result():
|
||||
# def test_update_scan_result():
|
||||
# def test_get_scan_results_by_target():
|
||||
Reference in New Issue
Block a user