From 5e67903c6b87119376b6e8096b6f4ae632fafb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Fri, 31 May 2024 10:58:20 +0200 Subject: [PATCH] Refactor all GMP tests Drop obsolete tests and adjust tests for enum imports. --- tests/protocols/gmpv208/__init__.py | 8 - tests/protocols/gmpv208/entities/__init__.py | 4 - .../entities/alerts/test_create_alert.py | 2 +- .../entities/alerts/test_modify_alert.py | 2 +- .../entities/alerts/test_trigger_alert.py | 2 +- .../entities/audits/test_create_audit.py | 2 +- .../entities/audits/test_modify_audit.py | 2 +- .../credentials/test_create_credential.py | 2 +- .../credentials/test_get_credential.py | 2 +- .../credentials/test_modify_credential.py | 2 +- .../entities/filters/test_create_filter.py | 2 +- .../entities/filters/test_modify_filter.py | 2 +- .../entities/notes/test_create_note.py | 19 -- .../entities/notes/test_modify_note.py | 20 --- .../overrides/test_create_override.py | 41 ----- .../overrides/test_modify_override.py | 43 ----- .../permissions/test_create_permission.py | 2 +- .../permissions/test_modify_permission.py | 2 +- .../port_lists/test_create_port_range.py | 2 +- .../test_clone_report_format.py | 2 +- .../test_delete_report_format.py | 2 +- .../report_formats/test_get_report_format.py | 2 +- .../test_modify_report_format.py | 2 +- .../test_verify_report_format.py | 2 +- .../entities/reports/test_get_report.py | 2 +- .../entities/scanners/test_create_scanner.py | 2 +- .../entities/scanners/test_modify_scanner.py | 2 +- .../gmpv208/entities/secinfo/test_get_info.py | 2 +- .../entities/secinfo/test_get_info_list.py | 2 +- .../gmpv208/entities/tags/test_create_tag.py | 2 +- .../gmpv208/entities/tags/test_modify_tag.py | 2 +- .../entities/targets/test_create_target.py | 2 +- .../entities/targets/test_modify_target.py | 2 +- .../entities/tasks/test_create_task.py | 2 +- .../entities/tasks/test_modify_task.py | 2 +- .../protocols/gmpv208/entities/test_alerts.py | 48 ----- .../protocols/gmpv208/entities/test_audits.py | 53 ------ .../gmpv208/entities/test_credentials.py | 48 ----- .../gmpv208/entities/test_filters.py | 38 ---- .../protocols/gmpv208/entities/test_groups.py | 38 ---- .../protocols/gmpv208/entities/test_hosts.py | 33 ---- .../protocols/gmpv208/entities/test_notes.py | 38 ---- .../entities/test_operating_systems.py | 36 ---- .../gmpv208/entities/test_overrides.py | 44 ----- .../gmpv208/entities/test_permissions.py | 48 ----- .../gmpv208/entities/test_policies.py | 80 --------- .../gmpv208/entities/test_port_lists.py | 58 ------ .../gmpv208/entities/test_report_formats.py | 57 ------ .../gmpv208/entities/test_reports.py | 28 --- .../gmpv208/entities/test_results.py | 15 -- .../protocols/gmpv208/entities/test_roles.py | 38 ---- .../gmpv208/entities/test_scan_configs.py | 125 ------------- .../gmpv208/entities/test_scanners.py | 43 ----- .../gmpv208/entities/test_schedules.py | 44 ----- .../gmpv208/entities/test_secinfo.py | 117 ------------ tests/protocols/gmpv208/entities/test_tags.py | 38 ---- .../gmpv208/entities/test_targets.py | 38 ---- .../protocols/gmpv208/entities/test_tasks.py | 65 ------- .../gmpv208/entities/test_tickets.py | 38 ---- .../gmpv208/entities/test_tls_certificates.py | 50 ------ .../protocols/gmpv208/entities/test_users.py | 38 ---- .../gmpv208/entities/test_vulnerabilities.py | 22 --- .../entities/tickets/test_modify_ticket.py | 2 +- .../entities/users/test_modify_user.py | 2 +- tests/protocols/gmpv208/enums/__init__.py | 4 - .../gmpv208/enums/test_aggregate_statistic.py | 61 ------- .../gmpv208/enums/test_alert_condition.py | 49 ------ .../gmpv208/enums/test_alert_event.py | 49 ------ .../gmpv208/enums/test_alert_method.py | 73 -------- .../gmpv208/enums/test_alive_test.py | 65 ------- .../gmpv208/enums/test_credential_format.py | 45 ----- .../gmpv208/enums/test_credential_type.py | 49 ------ .../gmpv208/enums/test_entity_type.py | 166 ------------------ .../protocols/gmpv208/enums/test_feed_type.py | 41 ----- .../gmpv208/enums/test_filter_type.py | 138 --------------- .../gmpv208/enums/test_help_format.py | 41 ----- .../gmpv208/enums/test_hosts_ordering.py | 33 ---- .../protocols/gmpv208/enums/test_info_type.py | 53 ------ .../enums/test_permission_subject_type.py | 37 ---- .../gmpv208/enums/test_port_range_type.py | 33 ---- .../gmpv208/enums/test_report_format_type.py | 101 ----------- .../gmpv208/enums/test_scanner_type.py | 60 ------- .../gmpv208/enums/test_severity_level.py | 49 ------ .../gmpv208/enums/test_snmp_algorithms.py | 49 ------ .../gmpv208/enums/test_sort_order.py | 33 ---- .../gmpv208/enums/test_ticket_status.py | 33 ---- .../gmpv208/enums/test_user_auth_type.py | 37 ---- .../system/aggregates/test_get_aggregates.py | 2 +- .../gmpv208/system/feed/test_get_feed.py | 2 +- .../gmpv208/system/help/test_help.py | 2 +- .../gmpv208/system/test_aggregates.py | 11 -- .../gmpv208/system/test_authentication.py | 25 --- tests/protocols/gmpv208/system/test_feed.py | 15 -- tests/protocols/gmpv208/system/test_help.py | 11 -- .../gmpv208/system/test_system_reports.py | 13 -- .../protocols/gmpv208/system/test_trashcan.py | 17 -- .../gmpv208/system/test_user_settings.py | 29 --- .../protocols/gmpv208/system/test_versions.py | 17 -- tests/protocols/gmpv208/test_gmp_types.py | 8 +- .../protocols/gmpv208/test_with_statement.py | 6 - tests/protocols/gmpv214/__init__.py | 9 - tests/protocols/gmpv214/entities/__init__.py | 4 - .../entities/notes/test_create_note.py | 2 +- .../entities/notes/test_modify_note.py | 2 +- .../overrides/test_create_override.py | 2 +- .../overrides/test_modify_override.py | 2 +- .../entities/scanners/test_create_scanner.py | 2 +- .../entities/scanners/test_modify_scanner.py | 2 +- .../entities/targets/test_create_target.py | 2 +- .../entities/targets/test_modify_target.py | 2 +- .../protocols/gmpv214/entities/test_alerts.py | 48 ----- .../protocols/gmpv214/entities/test_audits.py | 53 ------ .../gmpv214/entities/test_credentials.py | 48 ----- .../gmpv214/entities/test_filters.py | 38 ---- .../protocols/gmpv214/entities/test_groups.py | 38 ---- .../protocols/gmpv214/entities/test_hosts.py | 33 ---- .../protocols/gmpv214/entities/test_notes.py | 37 ---- .../entities/test_operating_systems.py | 36 ---- .../gmpv214/entities/test_overrides.py | 43 ----- .../gmpv214/entities/test_permissions.py | 48 ----- .../gmpv214/entities/test_policies.py | 80 --------- .../gmpv214/entities/test_port_lists.py | 58 ------ .../gmpv214/entities/test_report_formats.py | 57 ------ .../gmpv214/entities/test_reports.py | 28 --- .../gmpv214/entities/test_results.py | 18 -- .../protocols/gmpv214/entities/test_roles.py | 38 ---- .../gmpv214/entities/test_scan_configs.py | 111 ------------ .../gmpv214/entities/test_scanners.py | 37 ---- .../gmpv214/entities/test_schedules.py | 44 ----- .../gmpv214/entities/test_secinfo.py | 103 ----------- tests/protocols/gmpv214/entities/test_tags.py | 38 ---- .../gmpv214/entities/test_targets.py | 37 ---- .../protocols/gmpv214/entities/test_tasks.py | 65 ------- .../gmpv214/entities/test_tickets.py | 38 ---- .../gmpv214/entities/test_tls_certificates.py | 50 ------ .../protocols/gmpv214/entities/test_users.py | 38 ---- .../gmpv214/entities/test_vulnerabilities.py | 22 --- .../entities/users/test_modify_user.py | 2 +- tests/protocols/gmpv214/enums/__init__.py | 4 - .../gmpv214/enums/test_aggregate_statistic.py | 61 ------- .../gmpv214/enums/test_alert_condition.py | 49 ------ .../gmpv214/enums/test_alert_event.py | 49 ------ .../gmpv214/enums/test_alert_method.py | 73 -------- .../gmpv214/enums/test_alive_test.py | 65 ------- .../gmpv214/enums/test_credential_format.py | 45 ----- .../gmpv214/enums/test_credential_type.py | 49 ------ .../gmpv214/enums/test_entity_type.py | 166 ------------------ .../protocols/gmpv214/enums/test_feed_type.py | 41 ----- .../gmpv214/enums/test_filter_type.py | 138 --------------- .../gmpv214/enums/test_help_format.py | 41 ----- .../gmpv214/enums/test_hosts_ordering.py | 33 ---- .../protocols/gmpv214/enums/test_info_type.py | 53 ------ .../enums/test_permission_subject_type.py | 37 ---- .../gmpv214/enums/test_port_range_type.py | 33 ---- .../gmpv214/enums/test_report_format_type.py | 101 ----------- .../gmpv214/enums/test_scanner_type.py | 60 ------- .../gmpv214/enums/test_severity_level.py | 45 ----- .../gmpv214/enums/test_snmp_algorithms.py | 49 ------ .../gmpv214/enums/test_sort_order.py | 33 ---- .../gmpv214/enums/test_ticket_status.py | 33 ---- .../gmpv214/enums/test_user_auth_type.py | 37 ---- .../gmpv214/system/test_aggregates.py | 11 -- .../gmpv214/system/test_authentication.py | 25 --- tests/protocols/gmpv214/system/test_feed.py | 15 -- tests/protocols/gmpv214/system/test_help.py | 11 -- .../gmpv214/system/test_system_reports.py | 13 -- .../protocols/gmpv214/system/test_trashcan.py | 20 --- .../gmpv214/system/test_user_settings.py | 29 --- .../protocols/gmpv214/system/test_versions.py | 18 -- tests/protocols/gmpv214/test_gmp_types.py | 8 +- .../protocols/gmpv214/test_with_statement.py | 6 - .../entities/scanners/test_create_scanner.py | 2 +- .../entities/scanners/test_modify_scanner.py | 2 +- .../entities/targets/test_create_target.py | 2 +- .../entities/targets/test_modify_target.py | 2 +- .../entities/users/test_modify_user.py | 2 +- .../gmpv224/enums/test_aggregate_statistic.py | 2 +- .../gmpv224/enums/test_alert_condition.py | 2 +- .../gmpv224/enums/test_alert_event.py | 2 +- .../gmpv224/enums/test_alert_method.py | 2 +- .../gmpv224/enums/test_alive_test.py | 2 +- .../gmpv224/enums/test_credential_format.py | 2 +- .../gmpv224/enums/test_credential_type.py | 2 +- .../gmpv224/enums/test_entity_type.py | 2 +- .../protocols/gmpv224/enums/test_feed_type.py | 2 +- .../gmpv224/enums/test_filter_type.py | 2 +- .../gmpv224/enums/test_help_format.py | 2 +- .../gmpv224/enums/test_hosts_ordering.py | 2 +- .../protocols/gmpv224/enums/test_info_type.py | 2 +- .../enums/test_permission_subject_type.py | 2 +- .../gmpv224/enums/test_port_range_type.py | 2 +- .../gmpv224/enums/test_report_format_type.py | 2 +- .../gmpv224/enums/test_scanner_type.py | 2 +- .../gmpv224/enums/test_severity_level.py | 45 ----- .../gmpv224/enums/test_snmp_algorithms.py | 2 +- .../gmpv224/enums/test_sort_order.py | 2 +- .../gmpv224/enums/test_ticket_status.py | 2 +- .../gmpv224/enums/test_user_auth_type.py | 2 +- .../resourcenames/test_get_resource_name.py | 2 +- .../test_get_resource_names_list.py | 2 +- .../gmpv225/enums/test_aggregate_statistic.py | 2 +- .../gmpv225/enums/test_alert_condition.py | 2 +- .../gmpv225/enums/test_alert_event.py | 2 +- .../gmpv225/enums/test_alert_method.py | 2 +- .../gmpv225/enums/test_alive_test.py | 2 +- .../gmpv225/enums/test_credential_format.py | 2 +- .../gmpv225/enums/test_credential_type.py | 2 +- .../gmpv225/enums/test_entity_type.py | 2 +- .../protocols/gmpv225/enums/test_feed_type.py | 2 +- .../gmpv225/enums/test_filter_type.py | 2 +- .../gmpv225/enums/test_help_format.py | 2 +- .../gmpv225/enums/test_hosts_ordering.py | 2 +- .../gmpv225/enums/test_info_type copy.py | 2 +- .../enums/test_permission_subject_type.py | 2 +- .../gmpv225/enums/test_port_range_type.py | 2 +- .../gmpv225/enums/test_report_format_type.py | 2 +- .../gmpv225/enums/test_resource_type.py | 2 +- .../gmpv225/enums/test_scanner_type.py | 2 +- .../gmpv225/enums/test_severity_level.py | 45 ----- .../gmpv225/enums/test_snmp_algorithms.py | 2 +- .../gmpv225/enums/test_sort_order.py | 2 +- .../gmpv225/enums/test_ticket_status.py | 2 +- .../gmpv225/enums/test_user_auth_type.py | 2 +- 223 files changed, 95 insertions(+), 5833 deletions(-) delete mode 100644 tests/protocols/gmpv208/entities/__init__.py delete mode 100644 tests/protocols/gmpv208/entities/test_alerts.py delete mode 100644 tests/protocols/gmpv208/entities/test_audits.py delete mode 100644 tests/protocols/gmpv208/entities/test_credentials.py delete mode 100644 tests/protocols/gmpv208/entities/test_filters.py delete mode 100644 tests/protocols/gmpv208/entities/test_groups.py delete mode 100644 tests/protocols/gmpv208/entities/test_hosts.py delete mode 100644 tests/protocols/gmpv208/entities/test_notes.py delete mode 100644 tests/protocols/gmpv208/entities/test_operating_systems.py delete mode 100644 tests/protocols/gmpv208/entities/test_overrides.py delete mode 100644 tests/protocols/gmpv208/entities/test_permissions.py delete mode 100644 tests/protocols/gmpv208/entities/test_policies.py delete mode 100644 tests/protocols/gmpv208/entities/test_port_lists.py delete mode 100644 tests/protocols/gmpv208/entities/test_report_formats.py delete mode 100644 tests/protocols/gmpv208/entities/test_reports.py delete mode 100644 tests/protocols/gmpv208/entities/test_results.py delete mode 100644 tests/protocols/gmpv208/entities/test_roles.py delete mode 100644 tests/protocols/gmpv208/entities/test_scan_configs.py delete mode 100644 tests/protocols/gmpv208/entities/test_scanners.py delete mode 100644 tests/protocols/gmpv208/entities/test_schedules.py delete mode 100644 tests/protocols/gmpv208/entities/test_secinfo.py delete mode 100644 tests/protocols/gmpv208/entities/test_tags.py delete mode 100644 tests/protocols/gmpv208/entities/test_targets.py delete mode 100644 tests/protocols/gmpv208/entities/test_tasks.py delete mode 100644 tests/protocols/gmpv208/entities/test_tickets.py delete mode 100644 tests/protocols/gmpv208/entities/test_tls_certificates.py delete mode 100644 tests/protocols/gmpv208/entities/test_users.py delete mode 100644 tests/protocols/gmpv208/entities/test_vulnerabilities.py delete mode 100644 tests/protocols/gmpv208/enums/__init__.py delete mode 100644 tests/protocols/gmpv208/enums/test_aggregate_statistic.py delete mode 100644 tests/protocols/gmpv208/enums/test_alert_condition.py delete mode 100644 tests/protocols/gmpv208/enums/test_alert_event.py delete mode 100644 tests/protocols/gmpv208/enums/test_alert_method.py delete mode 100644 tests/protocols/gmpv208/enums/test_alive_test.py delete mode 100644 tests/protocols/gmpv208/enums/test_credential_format.py delete mode 100644 tests/protocols/gmpv208/enums/test_credential_type.py delete mode 100644 tests/protocols/gmpv208/enums/test_entity_type.py delete mode 100644 tests/protocols/gmpv208/enums/test_feed_type.py delete mode 100644 tests/protocols/gmpv208/enums/test_filter_type.py delete mode 100644 tests/protocols/gmpv208/enums/test_help_format.py delete mode 100644 tests/protocols/gmpv208/enums/test_hosts_ordering.py delete mode 100644 tests/protocols/gmpv208/enums/test_info_type.py delete mode 100644 tests/protocols/gmpv208/enums/test_permission_subject_type.py delete mode 100644 tests/protocols/gmpv208/enums/test_port_range_type.py delete mode 100644 tests/protocols/gmpv208/enums/test_report_format_type.py delete mode 100644 tests/protocols/gmpv208/enums/test_scanner_type.py delete mode 100644 tests/protocols/gmpv208/enums/test_severity_level.py delete mode 100644 tests/protocols/gmpv208/enums/test_snmp_algorithms.py delete mode 100644 tests/protocols/gmpv208/enums/test_sort_order.py delete mode 100644 tests/protocols/gmpv208/enums/test_ticket_status.py delete mode 100644 tests/protocols/gmpv208/enums/test_user_auth_type.py delete mode 100644 tests/protocols/gmpv208/system/test_aggregates.py delete mode 100644 tests/protocols/gmpv208/system/test_authentication.py delete mode 100644 tests/protocols/gmpv208/system/test_feed.py delete mode 100644 tests/protocols/gmpv208/system/test_help.py delete mode 100644 tests/protocols/gmpv208/system/test_system_reports.py delete mode 100644 tests/protocols/gmpv208/system/test_trashcan.py delete mode 100644 tests/protocols/gmpv208/system/test_user_settings.py delete mode 100644 tests/protocols/gmpv208/system/test_versions.py delete mode 100644 tests/protocols/gmpv214/entities/__init__.py delete mode 100644 tests/protocols/gmpv214/entities/test_alerts.py delete mode 100644 tests/protocols/gmpv214/entities/test_audits.py delete mode 100644 tests/protocols/gmpv214/entities/test_credentials.py delete mode 100644 tests/protocols/gmpv214/entities/test_filters.py delete mode 100644 tests/protocols/gmpv214/entities/test_groups.py delete mode 100644 tests/protocols/gmpv214/entities/test_hosts.py delete mode 100644 tests/protocols/gmpv214/entities/test_notes.py delete mode 100644 tests/protocols/gmpv214/entities/test_operating_systems.py delete mode 100644 tests/protocols/gmpv214/entities/test_overrides.py delete mode 100644 tests/protocols/gmpv214/entities/test_permissions.py delete mode 100644 tests/protocols/gmpv214/entities/test_policies.py delete mode 100644 tests/protocols/gmpv214/entities/test_port_lists.py delete mode 100644 tests/protocols/gmpv214/entities/test_report_formats.py delete mode 100644 tests/protocols/gmpv214/entities/test_reports.py delete mode 100644 tests/protocols/gmpv214/entities/test_results.py delete mode 100644 tests/protocols/gmpv214/entities/test_roles.py delete mode 100644 tests/protocols/gmpv214/entities/test_scan_configs.py delete mode 100644 tests/protocols/gmpv214/entities/test_scanners.py delete mode 100644 tests/protocols/gmpv214/entities/test_schedules.py delete mode 100644 tests/protocols/gmpv214/entities/test_secinfo.py delete mode 100644 tests/protocols/gmpv214/entities/test_tags.py delete mode 100644 tests/protocols/gmpv214/entities/test_targets.py delete mode 100644 tests/protocols/gmpv214/entities/test_tasks.py delete mode 100644 tests/protocols/gmpv214/entities/test_tickets.py delete mode 100644 tests/protocols/gmpv214/entities/test_tls_certificates.py delete mode 100644 tests/protocols/gmpv214/entities/test_users.py delete mode 100644 tests/protocols/gmpv214/entities/test_vulnerabilities.py delete mode 100644 tests/protocols/gmpv214/enums/__init__.py delete mode 100644 tests/protocols/gmpv214/enums/test_aggregate_statistic.py delete mode 100644 tests/protocols/gmpv214/enums/test_alert_condition.py delete mode 100644 tests/protocols/gmpv214/enums/test_alert_event.py delete mode 100644 tests/protocols/gmpv214/enums/test_alert_method.py delete mode 100644 tests/protocols/gmpv214/enums/test_alive_test.py delete mode 100644 tests/protocols/gmpv214/enums/test_credential_format.py delete mode 100644 tests/protocols/gmpv214/enums/test_credential_type.py delete mode 100644 tests/protocols/gmpv214/enums/test_entity_type.py delete mode 100644 tests/protocols/gmpv214/enums/test_feed_type.py delete mode 100644 tests/protocols/gmpv214/enums/test_filter_type.py delete mode 100644 tests/protocols/gmpv214/enums/test_help_format.py delete mode 100644 tests/protocols/gmpv214/enums/test_hosts_ordering.py delete mode 100644 tests/protocols/gmpv214/enums/test_info_type.py delete mode 100644 tests/protocols/gmpv214/enums/test_permission_subject_type.py delete mode 100644 tests/protocols/gmpv214/enums/test_port_range_type.py delete mode 100644 tests/protocols/gmpv214/enums/test_report_format_type.py delete mode 100644 tests/protocols/gmpv214/enums/test_scanner_type.py delete mode 100644 tests/protocols/gmpv214/enums/test_severity_level.py delete mode 100644 tests/protocols/gmpv214/enums/test_snmp_algorithms.py delete mode 100644 tests/protocols/gmpv214/enums/test_sort_order.py delete mode 100644 tests/protocols/gmpv214/enums/test_ticket_status.py delete mode 100644 tests/protocols/gmpv214/enums/test_user_auth_type.py delete mode 100644 tests/protocols/gmpv214/system/test_aggregates.py delete mode 100644 tests/protocols/gmpv214/system/test_authentication.py delete mode 100644 tests/protocols/gmpv214/system/test_feed.py delete mode 100644 tests/protocols/gmpv214/system/test_help.py delete mode 100644 tests/protocols/gmpv214/system/test_system_reports.py delete mode 100644 tests/protocols/gmpv214/system/test_trashcan.py delete mode 100644 tests/protocols/gmpv214/system/test_user_settings.py delete mode 100644 tests/protocols/gmpv214/system/test_versions.py delete mode 100644 tests/protocols/gmpv224/enums/test_severity_level.py delete mode 100644 tests/protocols/gmpv225/enums/test_severity_level.py diff --git a/tests/protocols/gmpv208/__init__.py b/tests/protocols/gmpv208/__init__.py index ae92608b6..9104ba9ff 100644 --- a/tests/protocols/gmpv208/__init__.py +++ b/tests/protocols/gmpv208/__init__.py @@ -2,11 +2,3 @@ # # SPDX-License-Identifier: GPL-3.0-or-later # - -from gvm.protocols.gmpv208 import Gmp - -from .. import GmpTestCase - - -class Gmpv208TestCase(GmpTestCase): - gmp_class = Gmp diff --git a/tests/protocols/gmpv208/entities/__init__.py b/tests/protocols/gmpv208/entities/__init__.py deleted file mode 100644 index bcfceaa60..000000000 --- a/tests/protocols/gmpv208/entities/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# diff --git a/tests/protocols/gmpv208/entities/alerts/test_create_alert.py b/tests/protocols/gmpv208/entities/alerts/test_create_alert.py index 5796eaf37..e93f1c406 100644 --- a/tests/protocols/gmpv208/entities/alerts/test_create_alert.py +++ b/tests/protocols/gmpv208/entities/alerts/test_create_alert.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import AlertCondition, AlertEvent, AlertMethod +from gvm.protocols.gmp.requests import AlertCondition, AlertEvent, AlertMethod class GmpCreateAlertTestMixin: diff --git a/tests/protocols/gmpv208/entities/alerts/test_modify_alert.py b/tests/protocols/gmpv208/entities/alerts/test_modify_alert.py index d0ac83d28..388ff85e5 100644 --- a/tests/protocols/gmpv208/entities/alerts/test_modify_alert.py +++ b/tests/protocols/gmpv208/entities/alerts/test_modify_alert.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import AlertCondition, AlertEvent, AlertMethod +from gvm.protocols.gmp.requests import AlertCondition, AlertEvent, AlertMethod class GmpModifyAlertTestMixin: diff --git a/tests/protocols/gmpv208/entities/alerts/test_trigger_alert.py b/tests/protocols/gmpv208/entities/alerts/test_trigger_alert.py index 042993661..d2f93ba24 100644 --- a/tests/protocols/gmpv208/entities/alerts/test_trigger_alert.py +++ b/tests/protocols/gmpv208/entities/alerts/test_trigger_alert.py @@ -4,7 +4,7 @@ # from gvm.errors import RequiredArgument -from gvm.protocols.gmpv208.entities.report_formats import ReportFormatType +from gvm.protocols.gmp.requests import ReportFormatType class GmpTriggerAlertTestMixin: diff --git a/tests/protocols/gmpv208/entities/audits/test_create_audit.py b/tests/protocols/gmpv208/entities/audits/test_create_audit.py index 328034a5a..c4c0596ad 100644 --- a/tests/protocols/gmpv208/entities/audits/test_create_audit.py +++ b/tests/protocols/gmpv208/entities/audits/test_create_audit.py @@ -6,7 +6,7 @@ from collections import OrderedDict from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import HostsOrdering +from gvm.protocols.gmp.requests import HostsOrdering class GmpCreateAuditTestMixin: diff --git a/tests/protocols/gmpv208/entities/audits/test_modify_audit.py b/tests/protocols/gmpv208/entities/audits/test_modify_audit.py index 98ed1b69a..14dafa82c 100644 --- a/tests/protocols/gmpv208/entities/audits/test_modify_audit.py +++ b/tests/protocols/gmpv208/entities/audits/test_modify_audit.py @@ -6,7 +6,7 @@ from collections import OrderedDict from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import HostsOrdering +from gvm.protocols.gmp.requests import HostsOrdering class GmpModifyAuditTestMixin: diff --git a/tests/protocols/gmpv208/entities/credentials/test_create_credential.py b/tests/protocols/gmpv208/entities/credentials/test_create_credential.py index 46a983cbf..13f13e4b2 100644 --- a/tests/protocols/gmpv208/entities/credentials/test_create_credential.py +++ b/tests/protocols/gmpv208/entities/credentials/test_create_credential.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import ( +from gvm.protocols.gmp.requests import ( CredentialType, SnmpAuthAlgorithm, SnmpPrivacyAlgorithm, diff --git a/tests/protocols/gmpv208/entities/credentials/test_get_credential.py b/tests/protocols/gmpv208/entities/credentials/test_get_credential.py index af95b0030..5d05dad2c 100644 --- a/tests/protocols/gmpv208/entities/credentials/test_get_credential.py +++ b/tests/protocols/gmpv208/entities/credentials/test_get_credential.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import CredentialFormat +from gvm.protocols.gmp.requests import CredentialFormat class GmpGetCredentialTestMixin: diff --git a/tests/protocols/gmpv208/entities/credentials/test_modify_credential.py b/tests/protocols/gmpv208/entities/credentials/test_modify_credential.py index f1fe40c38..bed96355f 100644 --- a/tests/protocols/gmpv208/entities/credentials/test_modify_credential.py +++ b/tests/protocols/gmpv208/entities/credentials/test_modify_credential.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import SnmpAuthAlgorithm, SnmpPrivacyAlgorithm +from gvm.protocols.gmp.requests import SnmpAuthAlgorithm, SnmpPrivacyAlgorithm class GmpModifyCredentialTestMixin: diff --git a/tests/protocols/gmpv208/entities/filters/test_create_filter.py b/tests/protocols/gmpv208/entities/filters/test_create_filter.py index 9f6d3f2ab..259ff7974 100644 --- a/tests/protocols/gmpv208/entities/filters/test_create_filter.py +++ b/tests/protocols/gmpv208/entities/filters/test_create_filter.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import FilterType +from gvm.protocols.gmp.requests import FilterType class GmpCreateFilterTestMixin: diff --git a/tests/protocols/gmpv208/entities/filters/test_modify_filter.py b/tests/protocols/gmpv208/entities/filters/test_modify_filter.py index 669e7717b..ef0d9bb58 100644 --- a/tests/protocols/gmpv208/entities/filters/test_modify_filter.py +++ b/tests/protocols/gmpv208/entities/filters/test_modify_filter.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import FilterType +from gvm.protocols.gmp.requests import FilterType class GmpModifyFilterTestMixin: diff --git a/tests/protocols/gmpv208/entities/notes/test_create_note.py b/tests/protocols/gmpv208/entities/notes/test_create_note.py index d4625d40b..100e033ce 100644 --- a/tests/protocols/gmpv208/entities/notes/test_create_note.py +++ b/tests/protocols/gmpv208/entities/notes/test_create_note.py @@ -6,7 +6,6 @@ from decimal import Decimal from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import SeverityLevel class GmpCreateNoteTestMixin: @@ -118,24 +117,6 @@ def test_create_note_with_severity(self): b"" ) - def test_create_note_with_threat(self): - self.gmp.create_note("foo", nvt_oid="oid1", threat=SeverityLevel.HIGH) - - self.connection.send.has_been_called_with( - b"" - b"foo" - b'' - b"High" - b"" - ) - - def test_create_note_invalid_threat(self): - with self.assertRaises(InvalidArgument): - self.gmp.create_note("foo", nvt_oid="oid1", threat="") - - with self.assertRaises(InvalidArgument): - self.gmp.create_note("foo", nvt_oid="oid1", threat="foo") - def test_create_note_with_days_active(self): self.gmp.create_note("foo", nvt_oid="oid1", days_active=0) diff --git a/tests/protocols/gmpv208/entities/notes/test_modify_note.py b/tests/protocols/gmpv208/entities/notes/test_modify_note.py index 93e7f8d75..56e345977 100644 --- a/tests/protocols/gmpv208/entities/notes/test_modify_note.py +++ b/tests/protocols/gmpv208/entities/notes/test_modify_note.py @@ -6,7 +6,6 @@ from decimal import Decimal from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import SeverityLevel class GmpModifyNoteTestMixin: @@ -142,25 +141,6 @@ def test_modify_note_with_severity(self): b"" ) - def test_modify_note_with_threat(self): - self.gmp.modify_note( - note_id="n1", text="foo", threat=SeverityLevel.HIGH - ) - - self.connection.send.has_been_called_with( - b'' - b"foo" - b"High" - b"" - ) - - def test_modify_note_invalid_threat(self): - with self.assertRaises(InvalidArgument): - self.gmp.modify_note(note_id="n1", text="foo", threat="") - - with self.assertRaises(InvalidArgument): - self.gmp.modify_note(note_id="n1", text="foo", threat="foo") - def test_modify_note_with_invalid_port(self): with self.assertRaises(InvalidArgument): self.gmp.modify_note(note_id="o1", text="foo", port="123") diff --git a/tests/protocols/gmpv208/entities/overrides/test_create_override.py b/tests/protocols/gmpv208/entities/overrides/test_create_override.py index 19d128f71..45fd31620 100644 --- a/tests/protocols/gmpv208/entities/overrides/test_create_override.py +++ b/tests/protocols/gmpv208/entities/overrides/test_create_override.py @@ -6,7 +6,6 @@ from decimal import Decimal from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import SeverityLevel class GmpCreateOverrideTestMixin: @@ -151,46 +150,6 @@ def test_create_override_with_new_severity(self): b"" ) - def test_create_override_with_threat(self): - self.gmp.create_override( - "foo", nvt_oid="oid1", threat=SeverityLevel.HIGH - ) - - self.connection.send.has_been_called_with( - b"" - b"foo" - b'' - b"High" - b"" - ) - - def test_create_override_invalid_threat(self): - with self.assertRaises(InvalidArgument): - self.gmp.create_override("foo", nvt_oid="oid1", threat="") - - with self.assertRaises(InvalidArgument): - self.gmp.create_override("foo", nvt_oid="oid1", threat="foo") - - def test_create_override_with_new_threat(self): - self.gmp.create_override( - "foo", nvt_oid="oid1", new_threat=SeverityLevel.HIGH - ) - - self.connection.send.has_been_called_with( - b"" - b"foo" - b'' - b"High" - b"" - ) - - def test_create_override_invalid_new_threat(self): - with self.assertRaises(InvalidArgument): - self.gmp.create_override("foo", nvt_oid="oid1", new_threat="") - - with self.assertRaises(InvalidArgument): - self.gmp.create_override("foo", nvt_oid="oid1", new_threat="foo") - def test_create_override_with_days_active(self): self.gmp.create_override("foo", nvt_oid="oid1", days_active=0) diff --git a/tests/protocols/gmpv208/entities/overrides/test_modify_override.py b/tests/protocols/gmpv208/entities/overrides/test_modify_override.py index 742e790f4..10a952b33 100644 --- a/tests/protocols/gmpv208/entities/overrides/test_modify_override.py +++ b/tests/protocols/gmpv208/entities/overrides/test_modify_override.py @@ -6,7 +6,6 @@ from decimal import Decimal from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import SeverityLevel class GmpModifyOverrideTestMixin: @@ -180,48 +179,6 @@ def test_modify_override_with_new_severity(self): b"" ) - def test_modify_override_with_threat(self): - self.gmp.modify_override( - override_id="o1", text="foo", threat=SeverityLevel.HIGH - ) - - self.connection.send.has_been_called_with( - b'' - b"foo" - b"High" - b"" - ) - - def test_modify_override_invalid_threat(self): - with self.assertRaises(InvalidArgument): - self.gmp.modify_override(override_id="o1", text="foo", threat="") - - with self.assertRaises(InvalidArgument): - self.gmp.modify_override(override_id="o1", text="foo", threat="foo") - - def test_modify_override_with_new_threat(self): - self.gmp.modify_override( - override_id="o1", text="foo", new_threat=SeverityLevel.HIGH - ) - - self.connection.send.has_been_called_with( - b'' - b"foo" - b"High" - b"" - ) - - def test_modify_override_invalid_new_threat(self): - with self.assertRaises(InvalidArgument): - self.gmp.modify_override( - override_id="o1", text="foo", new_threat="" - ) - - with self.assertRaises(InvalidArgument): - self.gmp.modify_override( - override_id="o1", text="foo", new_threat="foo" - ) - def test_modify_override_with_invalid_port(self): with self.assertRaises(InvalidArgument): self.gmp.modify_override(override_id="o1", text="foo", port="123") diff --git a/tests/protocols/gmpv208/entities/permissions/test_create_permission.py b/tests/protocols/gmpv208/entities/permissions/test_create_permission.py index d861181cb..67fce4da2 100644 --- a/tests/protocols/gmpv208/entities/permissions/test_create_permission.py +++ b/tests/protocols/gmpv208/entities/permissions/test_create_permission.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import EntityType, PermissionSubjectType +from gvm.protocols.gmp.requests import EntityType, PermissionSubjectType class GmpCreatePermissionTestMixin: diff --git a/tests/protocols/gmpv208/entities/permissions/test_modify_permission.py b/tests/protocols/gmpv208/entities/permissions/test_modify_permission.py index 896321a1f..435f08a60 100644 --- a/tests/protocols/gmpv208/entities/permissions/test_modify_permission.py +++ b/tests/protocols/gmpv208/entities/permissions/test_modify_permission.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import EntityType, PermissionSubjectType +from gvm.protocols.gmp.requests import EntityType, PermissionSubjectType class GmpModifyPermissionTestMixin: diff --git a/tests/protocols/gmpv208/entities/port_lists/test_create_port_range.py b/tests/protocols/gmpv208/entities/port_lists/test_create_port_range.py index e5a5959e6..6db779f95 100644 --- a/tests/protocols/gmpv208/entities/port_lists/test_create_port_range.py +++ b/tests/protocols/gmpv208/entities/port_lists/test_create_port_range.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208.entities.port_lists import PortRangeType +from gvm.protocols.gmp.requests import PortRangeType class GmpCreatePortRangeTestMixin: diff --git a/tests/protocols/gmpv208/entities/report_formats/test_clone_report_format.py b/tests/protocols/gmpv208/entities/report_formats/test_clone_report_format.py index 2b5eaa54a..3f871e896 100644 --- a/tests/protocols/gmpv208/entities/report_formats/test_clone_report_format.py +++ b/tests/protocols/gmpv208/entities/report_formats/test_clone_report_format.py @@ -4,7 +4,7 @@ # from gvm.errors import RequiredArgument -from gvm.protocols.gmpv208.entities.report_formats import ReportFormatType +from gvm.protocols.gmp.requests import ReportFormatType class GmpCloneReportFormatTestMixin: diff --git a/tests/protocols/gmpv208/entities/report_formats/test_delete_report_format.py b/tests/protocols/gmpv208/entities/report_formats/test_delete_report_format.py index 7bb47c138..8797a8f2f 100644 --- a/tests/protocols/gmpv208/entities/report_formats/test_delete_report_format.py +++ b/tests/protocols/gmpv208/entities/report_formats/test_delete_report_format.py @@ -4,7 +4,7 @@ # from gvm.errors import GvmError -from gvm.protocols.gmpv208.entities.report_formats import ReportFormatType +from gvm.protocols.gmp.requests import ReportFormatType class GmpDeleteReportFormatTestMixin: diff --git a/tests/protocols/gmpv208/entities/report_formats/test_get_report_format.py b/tests/protocols/gmpv208/entities/report_formats/test_get_report_format.py index b1af3c537..e071b87da 100644 --- a/tests/protocols/gmpv208/entities/report_formats/test_get_report_format.py +++ b/tests/protocols/gmpv208/entities/report_formats/test_get_report_format.py @@ -4,7 +4,7 @@ # from gvm.errors import RequiredArgument -from gvm.protocols.gmpv208.entities.report_formats import ReportFormatType +from gvm.protocols.gmp.requests import ReportFormatType class GmpGetReportFormatTestMixin: diff --git a/tests/protocols/gmpv208/entities/report_formats/test_modify_report_format.py b/tests/protocols/gmpv208/entities/report_formats/test_modify_report_format.py index f5ad79b3c..d6e015a66 100644 --- a/tests/protocols/gmpv208/entities/report_formats/test_modify_report_format.py +++ b/tests/protocols/gmpv208/entities/report_formats/test_modify_report_format.py @@ -4,7 +4,7 @@ # from gvm.errors import RequiredArgument -from gvm.protocols.gmpv208.entities.report_formats import ReportFormatType +from gvm.protocols.gmp.requests import ReportFormatType class GmpModifyReportFormatTestMixin: diff --git a/tests/protocols/gmpv208/entities/report_formats/test_verify_report_format.py b/tests/protocols/gmpv208/entities/report_formats/test_verify_report_format.py index 5acdc7c56..7e4af27d1 100644 --- a/tests/protocols/gmpv208/entities/report_formats/test_verify_report_format.py +++ b/tests/protocols/gmpv208/entities/report_formats/test_verify_report_format.py @@ -4,7 +4,7 @@ # from gvm.errors import GvmError -from gvm.protocols.gmpv208.entities.report_formats import ReportFormatType +from gvm.protocols.gmp.requests import ReportFormatType class GmpVerifyReportFormatTestMixin: diff --git a/tests/protocols/gmpv208/entities/reports/test_get_report.py b/tests/protocols/gmpv208/entities/reports/test_get_report.py index 1274b1805..b1853902a 100644 --- a/tests/protocols/gmpv208/entities/reports/test_get_report.py +++ b/tests/protocols/gmpv208/entities/reports/test_get_report.py @@ -4,7 +4,7 @@ # from gvm.errors import RequiredArgument -from gvm.protocols.gmpv208.entities.report_formats import ReportFormatType +from gvm.protocols.gmp.requests import ReportFormatType class GmpGetReportTestMixin: diff --git a/tests/protocols/gmpv208/entities/scanners/test_create_scanner.py b/tests/protocols/gmpv208/entities/scanners/test_create_scanner.py index 1d9786548..6c28968e0 100644 --- a/tests/protocols/gmpv208/entities/scanners/test_create_scanner.py +++ b/tests/protocols/gmpv208/entities/scanners/test_create_scanner.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import ScannerType +from gvm.protocols.gmp.requests import ScannerType class GmpCreateScannerTestMixin: diff --git a/tests/protocols/gmpv208/entities/scanners/test_modify_scanner.py b/tests/protocols/gmpv208/entities/scanners/test_modify_scanner.py index 236f17474..d150f258b 100644 --- a/tests/protocols/gmpv208/entities/scanners/test_modify_scanner.py +++ b/tests/protocols/gmpv208/entities/scanners/test_modify_scanner.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import ScannerType +from gvm.protocols.gmp.requests import ScannerType class GmpModifyScannerTestMixin: diff --git a/tests/protocols/gmpv208/entities/secinfo/test_get_info.py b/tests/protocols/gmpv208/entities/secinfo/test_get_info.py index 96d3f7351..f173dd9fd 100644 --- a/tests/protocols/gmpv208/entities/secinfo/test_get_info.py +++ b/tests/protocols/gmpv208/entities/secinfo/test_get_info.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import InfoType +from gvm.protocols.gmp.requests import InfoType class GmpGetInfoTestMixin: diff --git a/tests/protocols/gmpv208/entities/secinfo/test_get_info_list.py b/tests/protocols/gmpv208/entities/secinfo/test_get_info_list.py index f66807743..da44b4ab1 100644 --- a/tests/protocols/gmpv208/entities/secinfo/test_get_info_list.py +++ b/tests/protocols/gmpv208/entities/secinfo/test_get_info_list.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import InfoType +from gvm.protocols.gmp.requests import InfoType class GmpGetInfoListTestMixin: diff --git a/tests/protocols/gmpv208/entities/tags/test_create_tag.py b/tests/protocols/gmpv208/entities/tags/test_create_tag.py index 39d08a120..5ccc07fb8 100644 --- a/tests/protocols/gmpv208/entities/tags/test_create_tag.py +++ b/tests/protocols/gmpv208/entities/tags/test_create_tag.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import EntityType +from gvm.protocols.gmp.requests import EntityType class GmpCreateTagTestMixin: diff --git a/tests/protocols/gmpv208/entities/tags/test_modify_tag.py b/tests/protocols/gmpv208/entities/tags/test_modify_tag.py index b28551562..75adb077d 100644 --- a/tests/protocols/gmpv208/entities/tags/test_modify_tag.py +++ b/tests/protocols/gmpv208/entities/tags/test_modify_tag.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import EntityType +from gvm.protocols.gmp.requests import EntityType class GmpModifyTagTestMixin: diff --git a/tests/protocols/gmpv208/entities/targets/test_create_target.py b/tests/protocols/gmpv208/entities/targets/test_create_target.py index e4a618faf..ec897a397 100644 --- a/tests/protocols/gmpv208/entities/targets/test_create_target.py +++ b/tests/protocols/gmpv208/entities/targets/test_create_target.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208.entities.targets import AliveTest +from gvm.protocols.gmp.requests import AliveTest class GmpCreateTargetTestMixin: diff --git a/tests/protocols/gmpv208/entities/targets/test_modify_target.py b/tests/protocols/gmpv208/entities/targets/test_modify_target.py index 23a314501..a940bd532 100644 --- a/tests/protocols/gmpv208/entities/targets/test_modify_target.py +++ b/tests/protocols/gmpv208/entities/targets/test_modify_target.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208.entities.targets import AliveTest +from gvm.protocols.gmp.requests import AliveTest class GmpModifyTargetTestMixin: diff --git a/tests/protocols/gmpv208/entities/tasks/test_create_task.py b/tests/protocols/gmpv208/entities/tasks/test_create_task.py index 30c314dc5..f3f0c6848 100644 --- a/tests/protocols/gmpv208/entities/tasks/test_create_task.py +++ b/tests/protocols/gmpv208/entities/tasks/test_create_task.py @@ -6,7 +6,7 @@ from collections import OrderedDict from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import HostsOrdering +from gvm.protocols.gmp.requests import HostsOrdering class GmpCreateTaskTestMixin: diff --git a/tests/protocols/gmpv208/entities/tasks/test_modify_task.py b/tests/protocols/gmpv208/entities/tasks/test_modify_task.py index ace57ed7f..1dfb98ffb 100644 --- a/tests/protocols/gmpv208/entities/tasks/test_modify_task.py +++ b/tests/protocols/gmpv208/entities/tasks/test_modify_task.py @@ -6,7 +6,7 @@ from collections import OrderedDict from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import HostsOrdering +from gvm.protocols.gmp.requests import HostsOrdering class GmpModifyTaskTestMixin: diff --git a/tests/protocols/gmpv208/entities/test_alerts.py b/tests/protocols/gmpv208/entities/test_alerts.py deleted file mode 100644 index 3326c9dba..000000000 --- a/tests/protocols/gmpv208/entities/test_alerts.py +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .alerts import ( - GmpCloneAlertTestMixin, - GmpCreateAlertTestMixin, - GmpDeleteAlertTestMixin, - GmpGetAlertsTestMixin, - GmpGetAlertTestMixin, - GmpModifyAlertTestMixin, - GmpTestAlertTestMixin, - GmpTriggerAlertTestMixin, -) - - -class Gmpv208CloneAlertTestCase(GmpCloneAlertTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateAlertTestCase(GmpCreateAlertTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208DeleteAlertTestCase(GmpDeleteAlertTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetAlertTestCase(GmpGetAlertTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetAlertsTestCase(GmpGetAlertsTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyAlertTestCase(GmpModifyAlertTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208TestAlertTestCase(GmpTestAlertTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208TriggerAlertTestCase(GmpTriggerAlertTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_audits.py b/tests/protocols/gmpv208/entities/test_audits.py deleted file mode 100644 index ca5d67758..000000000 --- a/tests/protocols/gmpv208/entities/test_audits.py +++ /dev/null @@ -1,53 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .audits import ( - GmpCloneAuditTestMixin, - GmpCreateAuditTestMixin, - GmpDeleteAuditTestMixin, - GmpGetAuditsTestMixin, - GmpGetAuditTestMixin, - GmpModifyAuditTestMixin, - GmpResumeAuditTestMixin, - GmpStartAuditTestMixin, - GmpStopAuditTestMixin, -) - - -class Gmpv208CloneAuditTestCase(GmpCloneAuditTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateAuditTestCase(GmpCreateAuditTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208DeleteAuditTestCase(GmpDeleteAuditTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetAuditTestCase(GmpGetAuditTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetAuditsTestCase(GmpGetAuditsTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyAuditTestCase(GmpModifyAuditTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ResumeAuditTestCase(GmpResumeAuditTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208StartAuditTestCase(GmpStartAuditTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208StopAuditTestCase(GmpStopAuditTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_credentials.py b/tests/protocols/gmpv208/entities/test_credentials.py deleted file mode 100644 index 7e0f816ae..000000000 --- a/tests/protocols/gmpv208/entities/test_credentials.py +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .credentials import ( - GmpCloneCredentialTestMixin, - GmpCreateCredentialTestMixin, - GmpDeleteCredentialTestMixin, - GmpGetCredentialsTestMixin, - GmpGetCredentialTestMixin, - GmpModifyCredentialTestMixin, -) - - -class Gmpv208CloneCredentialTestCase( - GmpCloneCredentialTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208CreateCredentialTestCase( - GmpCreateCredentialTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208DeleteCredentialTestCase( - GmpDeleteCredentialTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetCredentialTestCase(GmpGetCredentialTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetCredentialsTestCase( - GmpGetCredentialsTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyCredentialTestCase( - GmpModifyCredentialTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_filters.py b/tests/protocols/gmpv208/entities/test_filters.py deleted file mode 100644 index 775a32e00..000000000 --- a/tests/protocols/gmpv208/entities/test_filters.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .filters import ( - GmpCloneFilterTestMixin, - GmpCreateFilterTestMixin, - GmpDeleteFilterTestMixin, - GmpGetFiltersTestMixin, - GmpGetFilterTestMixin, - GmpModifyFilterTestMixin, -) - - -class Gmpv208DeleteFilterTestCase(GmpDeleteFilterTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetFilterTestCase(GmpGetFilterTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetFiltersTestCase(GmpGetFiltersTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CloneFilterTestCase(GmpCloneFilterTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateFilterTestCase(GmpCreateFilterTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyFilterTestCase(GmpModifyFilterTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_groups.py b/tests/protocols/gmpv208/entities/test_groups.py deleted file mode 100644 index d9086a052..000000000 --- a/tests/protocols/gmpv208/entities/test_groups.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .groups import ( - GmpCloneGroupTestMixin, - GmpCreateGroupTestMixin, - GmpDeleteGroupTestMixin, - GmpGetGroupsTestMixin, - GmpGetGroupTestMixin, - GmpModifyGroupTestMixin, -) - - -class Gmpv208DeleteGroupTestCase(GmpDeleteGroupTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetGroupTestCase(GmpGetGroupTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetGroupsTestCase(GmpGetGroupsTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CloneGroupTestCase(GmpCloneGroupTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateGroupTestCase(GmpCreateGroupTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyGroupTestCase(GmpModifyGroupTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_hosts.py b/tests/protocols/gmpv208/entities/test_hosts.py deleted file mode 100644 index e9f5eede3..000000000 --- a/tests/protocols/gmpv208/entities/test_hosts.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .hosts import ( - GmpCreateHostTestMixin, - GmpDeleteHostTestMixin, - GmpGetHostsTestMixin, - GmpGetHostTestMixin, - GmpModifyHostTestMixin, -) - - -class Gmpv208CreateHostTestCase(GmpCreateHostTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208DeleteHostTestCase(GmpDeleteHostTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetHostTestCase(GmpGetHostTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetHostsTestCase(GmpGetHostsTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyHostTestCase(GmpModifyHostTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_notes.py b/tests/protocols/gmpv208/entities/test_notes.py deleted file mode 100644 index 5f816ba04..000000000 --- a/tests/protocols/gmpv208/entities/test_notes.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .notes import ( - GmpCloneNoteTestMixin, - GmpCreateNoteTestMixin, - GmpDeleteNoteTestMixin, - GmpGetNotesTestMixin, - GmpGetNoteTestMixin, - GmpModifyNoteTestMixin, -) - - -class Gmpv208DeleteNoteTestCase(GmpDeleteNoteTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetNoteTestCase(GmpGetNoteTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetNotesTestCase(GmpGetNotesTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CloneNoteTestCase(GmpCloneNoteTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateNoteTestCase(GmpCreateNoteTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyNoteTestCase(GmpModifyNoteTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_operating_systems.py b/tests/protocols/gmpv208/entities/test_operating_systems.py deleted file mode 100644 index ad74a6c9e..000000000 --- a/tests/protocols/gmpv208/entities/test_operating_systems.py +++ /dev/null @@ -1,36 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .operating_systems import ( - GmpDeleteOperatingSystemTestMixin, - GmpGetOperatingSystemsTestMixin, - GmpGetOperatingSystemTestMixin, - GmpModifyOperatingSystemTestMixin, -) - - -class Gmpv208DeleteOperatingSystemTestCase( - GmpDeleteOperatingSystemTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetOperatingSystemTestCase( - GmpGetOperatingSystemTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetOperatingSystemsTestCase( - GmpGetOperatingSystemsTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyOperatingSystemTestCase( - GmpModifyOperatingSystemTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_overrides.py b/tests/protocols/gmpv208/entities/test_overrides.py deleted file mode 100644 index 395d2eef8..000000000 --- a/tests/protocols/gmpv208/entities/test_overrides.py +++ /dev/null @@ -1,44 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .overrides import ( - GmpCloneOverrideTestMixin, - GmpCreateOverrideTestMixin, - GmpDeleteOverrideTestMixin, - GmpGetOverridesTestMixin, - GmpGetOverrideTestMixin, - GmpModifyOverrideTestMixin, -) - - -class Gmpv208CloneOverrideTestCase(GmpCloneOverrideTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateOverrideTestCase( - GmpCreateOverrideTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208DeleteOverrideTestCase( - GmpDeleteOverrideTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetOverrideTestCase(GmpGetOverrideTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetOverridesTestCase(GmpGetOverridesTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyOverrideTestCase( - GmpModifyOverrideTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_permissions.py b/tests/protocols/gmpv208/entities/test_permissions.py deleted file mode 100644 index 592becd85..000000000 --- a/tests/protocols/gmpv208/entities/test_permissions.py +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .permissions import ( - GmpClonePermissionTestMixin, - GmpCreatePermissionTestMixin, - GmpDeletePermissionTestMixin, - GmpGetPermissionsTestMixin, - GmpGetPermissionTestMixin, - GmpModifyPermissionTestMixin, -) - - -class Gmpv208DeletePermissionTestCase( - GmpDeletePermissionTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetPermissionTestCase(GmpGetPermissionTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetPermissionsTestCase( - GmpGetPermissionsTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ClonePermissionTestCase( - GmpClonePermissionTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208CreatePermissionTestCase( - GmpCreatePermissionTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyPermissionTestCase( - GmpModifyPermissionTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_policies.py b/tests/protocols/gmpv208/entities/test_policies.py deleted file mode 100644 index 083190f02..000000000 --- a/tests/protocols/gmpv208/entities/test_policies.py +++ /dev/null @@ -1,80 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .policies import ( - GmpClonePolicyTestMixin, - GmpCreatePolicyTestMixin, - GmpDeletePolicyTestMixin, - GmpGetPoliciesTestMixin, - GmpGetPolicyTestMixin, - GmpImportPolicyTestMixin, - GmpModifyPolicySetCommentTestMixin, - GmpModifyPolicySetFamilySelectionTestMixin, - GmpModifyPolicySetNameTestMixin, - GmpModifyPolicySetNvtPreferenceTestMixin, - GmpModifyPolicySetNvtSelectionTestMixin, - GmpModifyPolicySetScannerPreferenceTestMixin, -) - - -class Gmpv208ClonePolicyTestCase(GmpClonePolicyTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreatePolicyTestCase(GmpCreatePolicyTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208DeletePolicyTestCase(GmpDeletePolicyTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetPolicyTestCase(GmpGetPolicyTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetPoliciesTestCase(GmpGetPoliciesTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ImportPolicyTestCase(GmpImportPolicyTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyPolicySetCommentTestCase( - GmpModifyPolicySetCommentTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyPolicySetFamilySelectionTestCase( - GmpModifyPolicySetFamilySelectionTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyPolicySetNvtSelectionTestCase( - GmpModifyPolicySetNvtSelectionTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyPolicySetNameTestCase( - GmpModifyPolicySetNameTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyPolicySetNvtPreferenceTestCase( - GmpModifyPolicySetNvtPreferenceTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyPolicySetScannerPreferenceTestCase( - GmpModifyPolicySetScannerPreferenceTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_port_lists.py b/tests/protocols/gmpv208/entities/test_port_lists.py deleted file mode 100644 index 332e845ee..000000000 --- a/tests/protocols/gmpv208/entities/test_port_lists.py +++ /dev/null @@ -1,58 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .port_lists import ( - GmpClonePortListTestMixin, - GmpCreatePortListTestMixin, - GmpCreatePortRangeTestMixin, - GmpDeletePortListTestMixin, - GmpDeletePortRangeTestMixin, - GmpGetPortListsTestMixin, - GmpGetPortListTestMixin, - GmpModifyPortListTestMixin, -) - - -class Gmpv208ClonePortListTestCase(GmpClonePortListTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreatePortListTestCase( - GmpCreatePortListTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208CreatePortRangeListTestCase( - GmpCreatePortRangeTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208DeletePortListTestCase( - GmpDeletePortListTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208DeletePortRangeTestCase( - GmpDeletePortRangeTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetPortListTestCase(GmpGetPortListTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetPortListsTestCase(GmpGetPortListsTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyPortListTestCase( - GmpModifyPortListTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_report_formats.py b/tests/protocols/gmpv208/entities/test_report_formats.py deleted file mode 100644 index 80b45239a..000000000 --- a/tests/protocols/gmpv208/entities/test_report_formats.py +++ /dev/null @@ -1,57 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .report_formats import ( - GmpCloneReportFormatTestMixin, - GmpDeleteReportFormatTestMixin, - GmpGetReportFormatsTestMixin, - GmpGetReportFormatTestMixin, - GmpImportReportFormatTestMixin, - GmpModifyReportFormatTestMixin, - GmpVerifyReportFormatTestMixin, -) - - -class Gmpv208DeleteReportFormatTestCase( - GmpDeleteReportFormatTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetReportFormatTestCase( - GmpGetReportFormatTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetReportFormatsTestCase( - GmpGetReportFormatsTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208CloneReportFormatTestCase( - GmpCloneReportFormatTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ImportReportFormatTestCase( - GmpImportReportFormatTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyReportFormatTestCase( - GmpModifyReportFormatTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208VerifyReportFormatTestCase( - GmpVerifyReportFormatTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_reports.py b/tests/protocols/gmpv208/entities/test_reports.py deleted file mode 100644 index 6a1453c17..000000000 --- a/tests/protocols/gmpv208/entities/test_reports.py +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .reports import ( - GmpDeleteReportTestMixin, - GmpGetReportsTestMixin, - GmpGetReportTestMixin, - GmpImportReportTestMixin, -) - - -class Gmpv208DeleteReportTestCase(GmpDeleteReportTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetReportTestCase(GmpGetReportTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetReportsTestCase(GmpGetReportsTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ImportReportTestCase(GmpImportReportTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_results.py b/tests/protocols/gmpv208/entities/test_results.py deleted file mode 100644 index 1bf981e7a..000000000 --- a/tests/protocols/gmpv208/entities/test_results.py +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .results import GmpGetResultsTestMixin, GmpGetResultTestMixin - - -class Gmpv208GetResultTestCase(GmpGetResultTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetResultsTestCase(GmpGetResultsTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_roles.py b/tests/protocols/gmpv208/entities/test_roles.py deleted file mode 100644 index b9611cb79..000000000 --- a/tests/protocols/gmpv208/entities/test_roles.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .roles import ( - GmpCloneRoleTestMixin, - GmpCreateRoleTestMixin, - GmpDeleteRoleTestMixin, - GmpGetRolesTestMixin, - GmpGetRoleTestMixin, - GmpModifyRoleTestMixin, -) - - -class Gmpv208DeleteRoleTestCase(GmpDeleteRoleTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetRoleTestCase(GmpGetRoleTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetRolesTestCase(GmpGetRolesTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CloneRoleTestCase(GmpCloneRoleTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateRoleTestCase(GmpCreateRoleTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyRoleTestCase(GmpModifyRoleTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_scan_configs.py b/tests/protocols/gmpv208/entities/test_scan_configs.py deleted file mode 100644 index 53465bd93..000000000 --- a/tests/protocols/gmpv208/entities/test_scan_configs.py +++ /dev/null @@ -1,125 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .scan_configs import ( - GmpCloneScanConfigTestMixin, - GmpCreateScanConfigFromOSPScannerTestMixin, - GmpCreateScanConfigTestMixin, - GmpDeleteScanConfigTestMixin, - GmpGetScanConfigPreferencesTestMixin, - GmpGetScanConfigPreferenceTestMixin, - GmpGetScanConfigsTestMixin, - GmpGetScanConfigTestMixin, - GmpImportScanConfigTestMixin, - GmpModifyScanConfigSetCommentTestMixin, - GmpModifyScanConfigSetFamilySelectionTestMixin, - GmpModifyScanConfigSetNameTestMixin, - GmpModifyScanConfigSetNvtPreferenceTestMixin, - GmpModifyScanConfigSetNvtSelectionTestMixin, - GmpModifyScanConfigSetScannerPreferenceTestMixin, - GmpModifyScanConfigTestMixin, - GmpSyncScanConfigTestMixin, -) - - -class Gmpv208CloneScanConfigTestCase( - GmpCloneScanConfigTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208CreateScanConfigTestCase( - GmpCreateScanConfigTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208CreateScanConfigFromOSPScannerTestCase( - GmpCreateScanConfigFromOSPScannerTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208DeleteScanConfigTestCase( - GmpDeleteScanConfigTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetScanConfigTestCase(GmpGetScanConfigTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetScanConfigsTestCase( - GmpGetScanConfigsTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetScanConfigPreferenceTestCase( - GmpGetScanConfigPreferenceTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetScanConfigPreferencesTestCase( - GmpGetScanConfigPreferencesTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ImportScanConfigTestCase( - GmpImportScanConfigTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyScanConfigSetCommentTestCase( - GmpModifyScanConfigSetCommentTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyScanConfigSetFamilySelectionTestCase( - GmpModifyScanConfigSetFamilySelectionTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyScanConfigSetNvtSelectionTestCase( - GmpModifyScanConfigSetNvtSelectionTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyScanConfigSetNameTestCase( - GmpModifyScanConfigSetNameTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyScanConfigSetNvtPreferenceTestCase( - GmpModifyScanConfigSetNvtPreferenceTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyScanConfigSetScannerPreferenceTestCase( - GmpModifyScanConfigSetScannerPreferenceTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyScanConfigTestCase( - GmpModifyScanConfigTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208SyncScanConfigTestCase( - GmpSyncScanConfigTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_scanners.py b/tests/protocols/gmpv208/entities/test_scanners.py deleted file mode 100644 index 4d40d3feb..000000000 --- a/tests/protocols/gmpv208/entities/test_scanners.py +++ /dev/null @@ -1,43 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .scanners import ( - GmpCloneScannerTestMixin, - GmpCreateScannerTestMixin, - GmpDeleteScannerTestMixin, - GmpGetScannersTestMixin, - GmpGetScannerTestMixin, - GmpModifyScannerTestMixin, - GmpVerifyScannerTestMixin, -) - - -class Gmpv208CloneScannerTestCase(GmpCloneScannerTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateScannerTestCase(GmpCreateScannerTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208DeleteScannerTestCase(GmpDeleteScannerTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetScannerTestCase(GmpGetScannerTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetScannersTestCase(GmpGetScannersTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyScannerTestCase(GmpModifyScannerTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208VerifyScannerTestMixin(GmpVerifyScannerTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_schedules.py b/tests/protocols/gmpv208/entities/test_schedules.py deleted file mode 100644 index 1263fc90a..000000000 --- a/tests/protocols/gmpv208/entities/test_schedules.py +++ /dev/null @@ -1,44 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .schedules import ( - GmpCloneScheduleTestMixin, - GmpCreateScheduleTestMixin, - GmpDeleteScheduleTestMixin, - GmpGetSchedulesTestMixin, - GmpGetScheduleTestMixin, - GmpModifyScheduleTestMixin, -) - - -class Gmpv208DeleteScheduleTestCase( - GmpDeleteScheduleTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetScheduleTestCase(GmpGetScheduleTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetSchedulesTestCase(GmpGetSchedulesTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CloneScheduleTestCase(GmpCloneScheduleTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateScheduleTestCase( - GmpCreateScheduleTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyScheduleTestCase( - GmpModifyScheduleTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_secinfo.py b/tests/protocols/gmpv208/entities/test_secinfo.py deleted file mode 100644 index 0e7be1ab5..000000000 --- a/tests/protocols/gmpv208/entities/test_secinfo.py +++ /dev/null @@ -1,117 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .secinfo import ( - GmpGetCertBundListTestMixin, - GmpGetCertBundTestMixin, - GmpGetCpeListTestMixin, - GmpGetCpeTestMixin, - GmpGetCveListTestMixin, - GmpGetCveTestMixin, - GmpGetDfnCertListTestMixin, - GmpGetDfnCertTestMixin, - GmpGetInfoListTestMixin, - GmpGetInfoTestMixin, - GmpGetNvtFamiliesTestMixin, - GmpGetNvtListTestMixin, - GmpGetNvtPreferencesTestMixin, - GmpGetNvtPreferenceTestMixin, - GmpGetNvtTestMixin, - GmpGetOvalDefListTestMixin, - GmpGetOvalDefTestMixin, - GmpGetScanConfigNvtsTestMixin, - GmpGetScanConfigNvtTestMixin, -) - - -class Gmpv208GetCertBundTestCase(GmpGetCertBundTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetCpeTestCase(GmpGetCpeTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetCveTestCase(GmpGetCveTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetDfnCertCase(GmpGetDfnCertTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetOvalDefCase(GmpGetOvalDefTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetInfoListTestCase(GmpGetInfoListTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetInfoTestCase(GmpGetInfoTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetNvtTestCase(GmpGetNvtTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetNvtPreferenceTestCase( - GmpGetNvtPreferenceTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetNvtPreferencesTestCase( - GmpGetNvtPreferencesTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetScanConfigNvtTestCase( - GmpGetScanConfigNvtTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetNvtFamiliesTestCase( - GmpGetNvtFamiliesTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetScanConfigNvtsTestCase( - GmpGetScanConfigNvtsTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetCertBundListTestCase( - GmpGetCertBundListTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetCpeListTestCase(GmpGetCpeListTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetCveListTestCase(GmpGetCveListTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetDfnCertListCase(GmpGetDfnCertListTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetNvtListTestCase(GmpGetNvtListTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetOvalDefListTestCase( - GmpGetOvalDefListTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_tags.py b/tests/protocols/gmpv208/entities/test_tags.py deleted file mode 100644 index 386db9e2e..000000000 --- a/tests/protocols/gmpv208/entities/test_tags.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .tags import ( - GmpCloneTagTestMixin, - GmpCreateTagTestMixin, - GmpDeleteTagTestMixin, - GmpGetTagsTestMixin, - GmpGetTagTestMixin, - GmpModifyTagTestMixin, -) - - -class Gmpv208DeleteTagTestCase(GmpDeleteTagTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetTagTestCase(GmpGetTagTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetTagsTestCase(GmpGetTagsTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CloneTagTestCase(GmpCloneTagTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateTagTestCase(GmpCreateTagTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyTagTestCase(GmpModifyTagTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_targets.py b/tests/protocols/gmpv208/entities/test_targets.py deleted file mode 100644 index 6385d6f4c..000000000 --- a/tests/protocols/gmpv208/entities/test_targets.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .targets import ( - GmpCloneTargetTestMixin, - GmpCreateTargetTestMixin, - GmpDeleteTargetTestMixin, - GmpGetTargetsTestMixin, - GmpGetTargetTestMixin, - GmpModifyTargetTestMixin, -) - - -class Gmpv208CloneTargetTestCase(GmpCloneTargetTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateTargetTestCase(GmpCreateTargetTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208DeleteTargetTestCase(GmpDeleteTargetTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetTargetTestCase(GmpGetTargetTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetTargetsTestCase(GmpGetTargetsTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyTargetTestCase(GmpModifyTargetTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_tasks.py b/tests/protocols/gmpv208/entities/test_tasks.py deleted file mode 100644 index 0f5bfa8ea..000000000 --- a/tests/protocols/gmpv208/entities/test_tasks.py +++ /dev/null @@ -1,65 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .tasks import ( - GmpCloneTaskTestMixin, - GmpCreateContainerTaskTestMixin, - GmpCreateTaskTestMixin, - GmpDeleteTaskTestMixin, - GmpGetTasksTestMixin, - GmpGetTaskTestMixin, - GmpModifyTaskTestMixin, - GmpMoveTaskTestMixin, - GmpResumeTaskTestMixin, - GmpStartTaskTestMixin, - GmpStopTaskTestMixin, -) - - -class Gmpv208CloneTaskTestCase(GmpCloneTaskTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateContainerTaskTestCase( - GmpCreateContainerTaskTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208CreateTaskTestCase(GmpCreateTaskTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208DeleteTaskTestCase(GmpDeleteTaskTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetTaskTestCase(GmpGetTaskTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetTasksTestCase(GmpGetTasksTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyTaskTestCase(GmpModifyTaskTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208MoveTaskTestCase(GmpMoveTaskTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ResumeTaskTestCase(GmpResumeTaskTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208StartTaskTestCase(GmpStartTaskTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208StopTaskTestCase(GmpStopTaskTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_tickets.py b/tests/protocols/gmpv208/entities/test_tickets.py deleted file mode 100644 index 01d0c5844..000000000 --- a/tests/protocols/gmpv208/entities/test_tickets.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .tickets import ( - GmpCloneTicketTestMixin, - GmpCreateTicketTestMixin, - GmpDeleteTicketTestMixin, - GmpGetTicketsTestMixin, - GmpGetTicketTestMixin, - GmpModifyTicketTestMixin, -) - - -class Gmpv208DeleteTicketTestCase(GmpDeleteTicketTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetTicketTestCase(GmpGetTicketTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetTicketsTestCase(GmpGetTicketsTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CloneTicketTestCase(GmpCloneTicketTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateTicketTestCase(GmpCreateTicketTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyTicketTestCase(GmpModifyTicketTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_tls_certificates.py b/tests/protocols/gmpv208/entities/test_tls_certificates.py deleted file mode 100644 index ee136f4e1..000000000 --- a/tests/protocols/gmpv208/entities/test_tls_certificates.py +++ /dev/null @@ -1,50 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .tls_certificates import ( - GmpCloneTLSCertificateTestMixin, - GmpCreateTLSCertificateTestMixin, - GmpDeleteTLSCertificateTestMixin, - GmpGetTLSCertificatesTestMixin, - GmpGetTLSCertificateTestMixin, - GmpModifyTLSCertificateTestMixin, -) - - -class Gmpv208CloneTLSCertificateTestCase( - GmpCloneTLSCertificateTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208CreateTLSCertificateTestCase( - GmpCreateTLSCertificateTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208DeleteTLSCertificateTestCase( - GmpDeleteTLSCertificateTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetTLSCertificateTestCase( - GmpGetTLSCertificateTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetTLSCertificatesTestCase( - GmpGetTLSCertificatesTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyTLSCertificateTestCase( - GmpModifyTLSCertificateTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/test_users.py b/tests/protocols/gmpv208/entities/test_users.py deleted file mode 100644 index 1a0daa821..000000000 --- a/tests/protocols/gmpv208/entities/test_users.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .users import ( - GmpCloneUserTestMixin, - GmpCreateUserTestMixin, - GmpDeleteUserTestMixin, - GmpGetUsersTestMixin, - GmpGetUserTestMixin, - GmpModifyUserTestMixin, -) - - -class Gmpv208DeleteUserTestCase(GmpDeleteUserTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetUserTestCase(GmpGetUserTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetUsersTestCase(GmpGetUsersTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CloneUserTestCase(GmpCloneUserTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208CreateUserTestCase(GmpCreateUserTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyUserTestCase(GmpModifyUserTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/entities/test_vulnerabilities.py b/tests/protocols/gmpv208/entities/test_vulnerabilities.py deleted file mode 100644 index 286abaf5b..000000000 --- a/tests/protocols/gmpv208/entities/test_vulnerabilities.py +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .vulnerabilities import ( - GmpGetVulnerabilitiesTestMixin, - GmpGetVulnerabilityTestMixin, -) - - -class Gmpv208GetVulnerabilityTestCase( - GmpGetVulnerabilityTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetVulnerabilitiesTestCase( - GmpGetVulnerabilitiesTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/entities/tickets/test_modify_ticket.py b/tests/protocols/gmpv208/entities/tickets/test_modify_ticket.py index fb7dba4a4..310aa1c2f 100644 --- a/tests/protocols/gmpv208/entities/tickets/test_modify_ticket.py +++ b/tests/protocols/gmpv208/entities/tickets/test_modify_ticket.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import TicketStatus +from gvm.protocols.gmp.requests import TicketStatus class GmpModifyTicketTestMixin: diff --git a/tests/protocols/gmpv208/entities/users/test_modify_user.py b/tests/protocols/gmpv208/entities/users/test_modify_user.py index 76465c51a..ea8f55f8f 100644 --- a/tests/protocols/gmpv208/entities/users/test_modify_user.py +++ b/tests/protocols/gmpv208/entities/users/test_modify_user.py @@ -4,7 +4,7 @@ # from gvm.errors import RequiredArgument -from gvm.protocols.gmpv208 import UserAuthType +from gvm.protocols.gmp.requests import UserAuthType class GmpModifyUserTestMixin: diff --git a/tests/protocols/gmpv208/enums/__init__.py b/tests/protocols/gmpv208/enums/__init__.py deleted file mode 100644 index 9104ba9ff..000000000 --- a/tests/protocols/gmpv208/enums/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# diff --git a/tests/protocols/gmpv208/enums/test_aggregate_statistic.py b/tests/protocols/gmpv208/enums/test_aggregate_statistic.py deleted file mode 100644 index d1fafae9e..000000000 --- a/tests/protocols/gmpv208/enums/test_aggregate_statistic.py +++ /dev/null @@ -1,61 +0,0 @@ -# SPDX-FileCopyrightText: 2020-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import AggregateStatistic - - -class GetAggregateStatisticFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AggregateStatistic.from_string("foo") - - def test_none_or_empty(self): - ct = AggregateStatistic.from_string(None) - self.assertIsNone(ct) - ct = AggregateStatistic.from_string("") - self.assertIsNone(ct) - - def test_count(self): - ct = AggregateStatistic.from_string("count") - self.assertEqual(ct, AggregateStatistic.COUNT) - - def test_c_count(self): - ct = AggregateStatistic.from_string("c_count") - self.assertEqual(ct, AggregateStatistic.C_COUNT) - - def test_c_sum(self): - ct = AggregateStatistic.from_string("c_sum") - self.assertEqual(ct, AggregateStatistic.C_SUM) - - def test_max(self): - ct = AggregateStatistic.from_string("max") - self.assertEqual(ct, AggregateStatistic.MAX) - - def test_mean(self): - ct = AggregateStatistic.from_string("mean") - self.assertEqual(ct, AggregateStatistic.MEAN) - - def test_min(self): - ct = AggregateStatistic.from_string("min") - self.assertEqual(ct, AggregateStatistic.MIN) - - def test_sum(self): - ct = AggregateStatistic.from_string("sum") - self.assertEqual(ct, AggregateStatistic.SUM) - - def test_text(self): - ct = AggregateStatistic.from_string("text") - self.assertEqual(ct, AggregateStatistic.TEXT) - - def test_value(self): - ct = AggregateStatistic.from_string("value") - self.assertEqual(ct, AggregateStatistic.VALUE) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_alert_condition.py b/tests/protocols/gmpv208/enums/test_alert_condition.py deleted file mode 100644 index 424673177..000000000 --- a/tests/protocols/gmpv208/enums/test_alert_condition.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import AlertCondition - - -class GetAlertConditionFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AlertCondition.from_string("foo") - - def test_none_or_empty(self): - ct = AlertCondition.from_string(None) - self.assertIsNone(ct) - ct = AlertCondition.from_string("") - self.assertIsNone(ct) - - def test_always(self): - ct = AlertCondition.from_string("always") - self.assertEqual(ct, AlertCondition.ALWAYS) - - def test_filter_count_at_least(self): - ct = AlertCondition.from_string("filter count at least") - self.assertEqual(ct, AlertCondition.FILTER_COUNT_AT_LEAST) - - def test_filter_count_changed(self): - ct = AlertCondition.from_string("filter count changed") - self.assertEqual(ct, AlertCondition.FILTER_COUNT_CHANGED) - - def test_severity_at_least(self): - ct = AlertCondition.from_string("severity at least") - self.assertEqual(ct, AlertCondition.SEVERITY_AT_LEAST) - - def test_severity_changed(self): - ct = AlertCondition.from_string("severity changed") - self.assertEqual(ct, AlertCondition.SEVERITY_CHANGED) - - def test_error(self): - ct = AlertCondition.from_string("error") - self.assertEqual(ct, AlertCondition.ERROR) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_alert_event.py b/tests/protocols/gmpv208/enums/test_alert_event.py deleted file mode 100644 index bb8eb37d3..000000000 --- a/tests/protocols/gmpv208/enums/test_alert_event.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import AlertEvent - - -class GetAlertEventFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AlertEvent.from_string("foo") - - def test_none_or_empty(self): - ct = AlertEvent.from_string(None) - self.assertIsNone(ct) - ct = AlertEvent.from_string("") - self.assertIsNone(ct) - - def test_task_run_status_changed(self): - ct = AlertEvent.from_string("Task run status changed") - self.assertEqual(ct, AlertEvent.TASK_RUN_STATUS_CHANGED) - - def test_new_secinfo_arrived(self): - ct = AlertEvent.from_string("New SecInfo arrived") - self.assertEqual(ct, AlertEvent.NEW_SECINFO_ARRIVED) - - def test_updated_secinfo_arrived(self): - ct = AlertEvent.from_string("Updated SecInfo arrived") - self.assertEqual(ct, AlertEvent.UPDATED_SECINFO_ARRIVED) - - def test_ticket_received(self): - ct = AlertEvent.from_string("ticket received") - self.assertEqual(ct, AlertEvent.TICKET_RECEIVED) - - def test_assigned_ticket_changed(self): - ct = AlertEvent.from_string("assigned ticket changed") - self.assertEqual(ct, AlertEvent.ASSIGNED_TICKET_CHANGED) - - def test_owned_ticket_changed(self): - ct = AlertEvent.from_string("owned ticket changed") - self.assertEqual(ct, AlertEvent.OWNED_TICKET_CHANGED) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_alert_method.py b/tests/protocols/gmpv208/enums/test_alert_method.py deleted file mode 100644 index 161f42b9a..000000000 --- a/tests/protocols/gmpv208/enums/test_alert_method.py +++ /dev/null @@ -1,73 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import AlertMethod - - -class GetAlertMethodFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AlertMethod.from_string("foo") - - def test_none_or_empty(self): - ct = AlertMethod.from_string(None) - self.assertIsNone(ct) - ct = AlertMethod.from_string("") - self.assertIsNone(ct) - - def test_email(self): - ct = AlertMethod.from_string("email") - self.assertEqual(ct, AlertMethod.EMAIL) - - def test_scp(self): - ct = AlertMethod.from_string("scp") - self.assertEqual(ct, AlertMethod.SCP) - - def test_send(self): - ct = AlertMethod.from_string("send") - self.assertEqual(ct, AlertMethod.SEND) - - def test_smb(self): - ct = AlertMethod.from_string("smb") - self.assertEqual(ct, AlertMethod.SMB) - - def test_snmp(self): - ct = AlertMethod.from_string("snmp") - self.assertEqual(ct, AlertMethod.SNMP) - - def test_syslog(self): - ct = AlertMethod.from_string("syslog") - self.assertEqual(ct, AlertMethod.SYSLOG) - - def test_http_get(self): - ct = AlertMethod.from_string("HTTP Get") - self.assertEqual(ct, AlertMethod.HTTP_GET) - - def test_start_task(self): - ct = AlertMethod.from_string("Start Task") - self.assertEqual(ct, AlertMethod.START_TASK) - - def test_sourcefire_connector(self): - ct = AlertMethod.from_string("sourcefire Connector") - self.assertEqual(ct, AlertMethod.SOURCEFIRE_CONNECTOR) - - def test_verinice_connector(self): - ct = AlertMethod.from_string("verinice Connector") - self.assertEqual(ct, AlertMethod.VERINICE_CONNECTOR) - - def test_tippingpoint_sms(self): - ct = AlertMethod.from_string("Tippingpoint SMS") - self.assertEqual(ct, AlertMethod.TIPPINGPOINT_SMS) - - def test_alemba_vfire(self): - ct = AlertMethod.from_string("Alemba vFire") - self.assertEqual(ct, AlertMethod.ALEMBA_VFIRE) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_alive_test.py b/tests/protocols/gmpv208/enums/test_alive_test.py deleted file mode 100644 index 5c0a722ec..000000000 --- a/tests/protocols/gmpv208/enums/test_alive_test.py +++ /dev/null @@ -1,65 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import AliveTest - - -class GetAliveTestFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AliveTest.from_string("foo") - - def test_none_or_empty(self): - ct = AliveTest.from_string(None) - self.assertIsNone(ct) - ct = AliveTest.from_string("") - self.assertIsNone(ct) - - def test_scan_config_default(self): - ct = AliveTest.from_string("Scan Config Default") - self.assertEqual(ct, AliveTest.SCAN_CONFIG_DEFAULT) - - def test_icmp_ping(self): - ct = AliveTest.from_string("ICMP Ping") - self.assertEqual(ct, AliveTest.ICMP_PING) - - def test_tcp_ack_service_ping(self): - ct = AliveTest.from_string("TCP-ACK Service Ping") - self.assertEqual(ct, AliveTest.TCP_ACK_SERVICE_PING) - - def test_tcp_sync_service_ping(self): - ct = AliveTest.from_string("TCP-SYN Service Ping") - self.assertEqual(ct, AliveTest.TCP_SYN_SERVICE_PING) - - def test_arp_ping(self): - ct = AliveTest.from_string("ARP Ping") - self.assertEqual(ct, AliveTest.ARP_PING) - - def test_icmp_and_tcp_ack_service_ping(self): - ct = AliveTest.from_string("ICMP & TCP-ACK Service Ping") - self.assertEqual(ct, AliveTest.ICMP_AND_TCP_ACK_SERVICE_PING) - - def test_icmp_and_arp_ping(self): - ct = AliveTest.from_string("ICMP & ARP Ping") - self.assertEqual(ct, AliveTest.ICMP_AND_ARP_PING) - - def test_tcp_ack_service_and_arp_ping(self): - ct = AliveTest.from_string("TCP-ACK Service & ARP Ping") - self.assertEqual(ct, AliveTest.TCP_ACK_SERVICE_AND_ARP_PING) - - def test_icmp_tcp_ack_service_and_arp_ping(self): - ct = AliveTest.from_string("ICMP, TCP-ACK Service & ARP Ping") - self.assertEqual(ct, AliveTest.ICMP_TCP_ACK_SERVICE_AND_ARP_PING) - - def test_consider_alive(self): - ct = AliveTest.from_string("Consider Alive") - self.assertEqual(ct, AliveTest.CONSIDER_ALIVE) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_credential_format.py b/tests/protocols/gmpv208/enums/test_credential_format.py deleted file mode 100644 index c91b67e62..000000000 --- a/tests/protocols/gmpv208/enums/test_credential_format.py +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import CredentialFormat - - -class GetCredentialFromatFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - CredentialFormat.from_string("foo") - - def test_none_or_empty(self): - ct = CredentialFormat.from_string(None) - self.assertIsNone(ct) - ct = CredentialFormat.from_string("") - self.assertIsNone(ct) - - def test_key(self): - ct = CredentialFormat.from_string("key") - self.assertEqual(ct, CredentialFormat.KEY) - - def test_rpm(self): - ct = CredentialFormat.from_string("rpm") - self.assertEqual(ct, CredentialFormat.RPM) - - def test_deb(self): - ct = CredentialFormat.from_string("deb") - self.assertEqual(ct, CredentialFormat.DEB) - - def test_exe(self): - ct = CredentialFormat.from_string("exe") - self.assertEqual(ct, CredentialFormat.EXE) - - def test_pem(self): - ct = CredentialFormat.from_string("pem") - self.assertEqual(ct, CredentialFormat.PEM) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_credential_type.py b/tests/protocols/gmpv208/enums/test_credential_type.py deleted file mode 100644 index 47fa6c022..000000000 --- a/tests/protocols/gmpv208/enums/test_credential_type.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import CredentialType - - -class GetCredentialTypeFromStringTestCase(unittest.TestCase): - def test_invalid_type(self): - with self.assertRaises(InvalidArgument): - CredentialType.from_string("foo") - - def test_none_or_empty_type(self): - ct = CredentialType.from_string(None) - self.assertIsNone(ct) - ct = CredentialType.from_string("") - self.assertIsNone(ct) - - def test_client_certificate(self): - ct = CredentialType.from_string("client_certificate") - self.assertEqual(ct, CredentialType.CLIENT_CERTIFICATE) - - def test_snmp(self): - ct = CredentialType.from_string("snmp") - self.assertEqual(ct, CredentialType.SNMP) - - def test_username_password(self): - ct = CredentialType.from_string("username_password") - self.assertEqual(ct, CredentialType.USERNAME_PASSWORD) - - def test_username_ssh_key(self): - ct = CredentialType.from_string("username_ssh_key") - self.assertEqual(ct, CredentialType.USERNAME_SSH_KEY) - - def test_smime_certificate(self): - ct = CredentialType.from_string("smime_certificate") - self.assertEqual(ct, CredentialType.SMIME_CERTIFICATE) - - def test_pgp_encryption_key(self): - ct = CredentialType.from_string("pgp_encryption_key") - self.assertEqual(ct, CredentialType.PGP_ENCRYPTION_KEY) - - def test_password_only(self): - ct = CredentialType.from_string("password_only") - self.assertEqual(ct, CredentialType.PASSWORD_ONLY) diff --git a/tests/protocols/gmpv208/enums/test_entity_type.py b/tests/protocols/gmpv208/enums/test_entity_type.py deleted file mode 100644 index e9eda8a62..000000000 --- a/tests/protocols/gmpv208/enums/test_entity_type.py +++ /dev/null @@ -1,166 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import EntityType - - -class GetEntityTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - EntityType.from_string("foo") - - def test_none_or_empty(self): - ct = EntityType.from_string(None) - self.assertIsNone(ct) - ct = EntityType.from_string("") - self.assertIsNone(ct) - - def test_alert(self): - ct = EntityType.from_string("alert") - self.assertEqual(ct, EntityType.ALERT) - - def test_asset(self): - ct = EntityType.from_string("asset") - self.assertEqual(ct, EntityType.ASSET) - - def test_audit(self): - ct = EntityType.from_string("audit") - self.assertEqual(ct, EntityType.AUDIT) - - def test_cert_bund_adv(self): - ct = EntityType.from_string("cert_bund_adv") - self.assertEqual(ct, EntityType.CERT_BUND_ADV) - - def test_cpe(self): - ct = EntityType.from_string("cpe") - self.assertEqual(ct, EntityType.CPE) - - def test_credential(self): - ct = EntityType.from_string("credential") - self.assertEqual(ct, EntityType.CREDENTIAL) - - def test_dfn_cert_adv(self): - ct = EntityType.from_string("dfn_cert_adv") - self.assertEqual(ct, EntityType.DFN_CERT_ADV) - - def test_filter(self): - ct = EntityType.from_string("filter") - self.assertEqual(ct, EntityType.FILTER) - - def test_group(self): - ct = EntityType.from_string("group") - self.assertEqual(ct, EntityType.GROUP) - - def test_host(self): - ct = EntityType.from_string("host") - self.assertEqual(ct, EntityType.HOST) - - def test_info(self): - ct = EntityType.from_string("info") - self.assertEqual(ct, EntityType.INFO) - - def test_note(self): - ct = EntityType.from_string("note") - self.assertEqual(ct, EntityType.NOTE) - - def test_nvt(self): - ct = EntityType.from_string("nvt") - self.assertEqual(ct, EntityType.NVT) - - def test_operating_system(self): - ct = EntityType.from_string("os") - self.assertEqual(ct, EntityType.OPERATING_SYSTEM) - - ct = EntityType.from_string("operating_system") - self.assertEqual(ct, EntityType.OPERATING_SYSTEM) - - def test_ovaldef(self): - ct = EntityType.from_string("ovaldef") - self.assertEqual(ct, EntityType.OVALDEF) - - def test_override(self): - ct = EntityType.from_string("override") - self.assertEqual(ct, EntityType.OVERRIDE) - - def test_permission(self): - ct = EntityType.from_string("permission") - self.assertEqual(ct, EntityType.PERMISSION) - - def test_policy(self): - ct = EntityType.from_string("policy") - self.assertEqual(ct, EntityType.POLICY) - - def test_port_list(self): - ct = EntityType.from_string("port_list") - self.assertEqual(ct, EntityType.PORT_LIST) - - def test_report(self): - ct = EntityType.from_string("report") - self.assertEqual(ct, EntityType.REPORT) - - def test_report_format(self): - ct = EntityType.from_string("report_format") - self.assertEqual(ct, EntityType.REPORT_FORMAT) - - def test_result(self): - ct = EntityType.from_string("result") - self.assertEqual(ct, EntityType.RESULT) - - def test_role(self): - ct = EntityType.from_string("role") - self.assertEqual(ct, EntityType.ROLE) - - def test_scan_config(self): - ct = EntityType.from_string("config") - self.assertEqual(ct, EntityType.SCAN_CONFIG) - - ct = EntityType.from_string("scan_config") - self.assertEqual(ct, EntityType.SCAN_CONFIG) - - def test_scanner(self): - ct = EntityType.from_string("scanner") - self.assertEqual(ct, EntityType.SCANNER) - - def test_schedule(self): - ct = EntityType.from_string("schedule") - self.assertEqual(ct, EntityType.SCHEDULE) - - def test_tag(self): - ct = EntityType.from_string("tag") - self.assertEqual(ct, EntityType.TAG) - - def test_target(self): - ct = EntityType.from_string("target") - self.assertEqual(ct, EntityType.TARGET) - - def test_task(self): - ct = EntityType.from_string("task") - self.assertEqual(ct, EntityType.TASK) - - def test_ticket(self): - ct = EntityType.from_string("ticket") - self.assertEqual(ct, EntityType.TICKET) - - def test_tls_certificate(self): - ft = EntityType.from_string("tls_certificate") - self.assertEqual(ft, EntityType.TLS_CERTIFICATE) - - def test_user(self): - ct = EntityType.from_string("user") - self.assertEqual(ct, EntityType.USER) - - def test_vulnerability(self): - ct = EntityType.from_string("vuln") - self.assertEqual(ct, EntityType.VULNERABILITY) - - ct = EntityType.from_string("vulnerability") - self.assertEqual(ct, EntityType.VULNERABILITY) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_feed_type.py b/tests/protocols/gmpv208/enums/test_feed_type.py deleted file mode 100644 index 929a6735d..000000000 --- a/tests/protocols/gmpv208/enums/test_feed_type.py +++ /dev/null @@ -1,41 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import FeedType - - -class GetFeedTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - FeedType.from_string("foo") - - def test_none_or_empty(self): - ct = FeedType.from_string(None) - self.assertIsNone(ct) - ct = FeedType.from_string("") - self.assertIsNone(ct) - - def test_nvt(self): - ct = FeedType.from_string("nvt") - self.assertEqual(ct, FeedType.NVT) - - def test_cert(self): - ct = FeedType.from_string("cert") - self.assertEqual(ct, FeedType.CERT) - - def test_scap(self): - ct = FeedType.from_string("scap") - self.assertEqual(ct, FeedType.SCAP) - - def test_gvmd_data(self): - ct = FeedType.from_string("gvmd_data") - self.assertEqual(ct, FeedType.GVMD_DATA) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_filter_type.py b/tests/protocols/gmpv208/enums/test_filter_type.py deleted file mode 100644 index 474b91fe6..000000000 --- a/tests/protocols/gmpv208/enums/test_filter_type.py +++ /dev/null @@ -1,138 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import FilterType - - -class GetFilterTypeFomStringTestCase(unittest.TestCase): - def test_filter_type_alert(self): - ft = FilterType.from_string("alert") - self.assertEqual(ft, FilterType.ALERT) - - def test_filter_type_asset(self): - ft = FilterType.from_string("asset") - self.assertEqual(ft, FilterType.ASSET) - - def test_filter_type_credential(self): - ft = FilterType.from_string("credential") - self.assertEqual(ft, FilterType.CREDENTIAL) - - def test_filter_type_filter(self): - ft = FilterType.from_string("filter") - self.assertEqual(ft, FilterType.FILTER) - - def test_filter_type_group(self): - ft = FilterType.from_string("group") - self.assertEqual(ft, FilterType.GROUP) - - def test_filter_type_host(self): - ft = FilterType.from_string("host") - self.assertEqual(ft, FilterType.HOST) - - def test_filter_type_note(self): - ft = FilterType.from_string("note") - self.assertEqual(ft, FilterType.NOTE) - - def test_filter_type_override(self): - ft = FilterType.from_string("override") - self.assertEqual(ft, FilterType.OVERRIDE) - - def test_filter_type_permission(self): - ft = FilterType.from_string("permission") - self.assertEqual(ft, FilterType.PERMISSION) - - def test_filter_type_port_list(self): - ft = FilterType.from_string("port_list") - self.assertEqual(ft, FilterType.PORT_LIST) - - def test_filter_type_report(self): - ft = FilterType.from_string("report") - self.assertEqual(ft, FilterType.REPORT) - - def test_filter_type_report_format(self): - ft = FilterType.from_string("report_format") - self.assertEqual(ft, FilterType.REPORT_FORMAT) - - def test_filter_type_result(self): - ft = FilterType.from_string("result") - self.assertEqual(ft, FilterType.RESULT) - - def test_filter_type_role(self): - ft = FilterType.from_string("role") - self.assertEqual(ft, FilterType.ROLE) - - def test_filter_type_schedule(self): - ft = FilterType.from_string("schedule") - self.assertEqual(ft, FilterType.SCHEDULE) - - def test_filter_type_secinfo(self): - ft = FilterType.from_string("secinfo") - self.assertEqual(ft, FilterType.ALL_SECINFO) - - def test_filter_type_all_secinfo(self): - ft = FilterType.from_string("all_secinfo") - self.assertEqual(ft, FilterType.ALL_SECINFO) - - def test_filter_type_tag(self): - ft = FilterType.from_string("tag") - self.assertEqual(ft, FilterType.TAG) - - def test_filter_type_task(self): - ft = FilterType.from_string("task") - self.assertEqual(ft, FilterType.TASK) - - def test_filter_type_target(self): - ft = FilterType.from_string("target") - self.assertEqual(ft, FilterType.TARGET) - - def test_filter_type_ticket(self): - ft = FilterType.from_string("ticket") - self.assertEqual(ft, FilterType.TICKET) - - def test_filter_type_tls_certificate(self): - ft = FilterType.from_string("tls_certificate") - self.assertEqual(ft, FilterType.TLS_CERTIFICATE) - - def test_filter_type_operating_system(self): - ft = FilterType.from_string("operating_system") - self.assertEqual(ft, FilterType.OPERATING_SYSTEM) - - def test_filter_type_user(self): - ft = FilterType.from_string("user") - self.assertEqual(ft, FilterType.USER) - - def test_filter_type_vuln(self): - ft = FilterType.from_string("vuln") - self.assertEqual(ft, FilterType.VULNERABILITY) - - def test_filter_type_vulnerability(self): - ft = FilterType.from_string("vulnerability") - self.assertEqual(ft, FilterType.VULNERABILITY) - - def test_filter_type_config(self): - ft = FilterType.from_string("config") - self.assertEqual(ft, FilterType.SCAN_CONFIG) - - def test_filter_type_scan_config(self): - ft = FilterType.from_string("scan_config") - self.assertEqual(ft, FilterType.SCAN_CONFIG) - - def test_filter_type_os(self): - ft = FilterType.from_string("os") - self.assertEqual(ft, FilterType.OPERATING_SYSTEM) - - def test_invalid_filter_type(self): - with self.assertRaises(InvalidArgument): - FilterType.from_string("foo") - - def test_non_or_empty_filter_type(self): - ft = FilterType.from_string(None) - self.assertIsNone(ft) - - ft = FilterType.from_string("") - self.assertIsNone(ft) diff --git a/tests/protocols/gmpv208/enums/test_help_format.py b/tests/protocols/gmpv208/enums/test_help_format.py deleted file mode 100644 index 2627da1fd..000000000 --- a/tests/protocols/gmpv208/enums/test_help_format.py +++ /dev/null @@ -1,41 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import HelpFormat - - -class GetHelpFormatFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - HelpFormat.from_string("foo") - - def test_none_or_empty(self): - ct = HelpFormat.from_string(None) - self.assertIsNone(ct) - ct = HelpFormat.from_string("") - self.assertIsNone(ct) - - def test_task_run_status_changed(self): - ct = HelpFormat.from_string("HtMl") - self.assertEqual(ct, HelpFormat.HTML) - - def test_new_secinfo_arrived(self): - ct = HelpFormat.from_string("rNc") - self.assertEqual(ct, HelpFormat.RNC) - - def test_updated_secinfo_arrived(self): - ct = HelpFormat.from_string("tExT") - self.assertEqual(ct, HelpFormat.TEXT) - - def test_ticket_received(self): - ct = HelpFormat.from_string("XmL") - self.assertEqual(ct, HelpFormat.XML) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_hosts_ordering.py b/tests/protocols/gmpv208/enums/test_hosts_ordering.py deleted file mode 100644 index fc5f2e9e8..000000000 --- a/tests/protocols/gmpv208/enums/test_hosts_ordering.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import HostsOrdering - - -class GetHostsOrderingFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - HostsOrdering.from_string("foo") - - def test_none_or_empty(self): - ct = HostsOrdering.from_string(None) - self.assertIsNone(ct) - ct = HostsOrdering.from_string("") - self.assertIsNone(ct) - - def test_sequential(self): - ct = HostsOrdering.from_string("sequential") - self.assertEqual(ct, HostsOrdering.SEQUENTIAL) - - def test_random(self): - ct = HostsOrdering.from_string("random") - self.assertEqual(ct, HostsOrdering.RANDOM) - - def test_reverse(self): - ct = HostsOrdering.from_string("reverse") - self.assertEqual(ct, HostsOrdering.REVERSE) diff --git a/tests/protocols/gmpv208/enums/test_info_type.py b/tests/protocols/gmpv208/enums/test_info_type.py deleted file mode 100644 index f5547a8ff..000000000 --- a/tests/protocols/gmpv208/enums/test_info_type.py +++ /dev/null @@ -1,53 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import InfoType - - -class GetInfoTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - InfoType.from_string("foo") - - def test_none_or_empty(self): - ct = InfoType.from_string(None) - self.assertIsNone(ct) - ct = InfoType.from_string("") - self.assertIsNone(ct) - - def test_cert_bund_adv(self): - ct = InfoType.from_string("cert_bund_adv") - self.assertEqual(ct, InfoType.CERT_BUND_ADV) - - def test_cpe(self): - ct = InfoType.from_string("cpe") - self.assertEqual(ct, InfoType.CPE) - - def test_cve(self): - ct = InfoType.from_string("cve") - self.assertEqual(ct, InfoType.CVE) - - def test_dfn_cert_adv(self): - ct = InfoType.from_string("dfn_cert_adv") - self.assertEqual(ct, InfoType.DFN_CERT_ADV) - - def test_nvt(self): - ct = InfoType.from_string("nvt") - self.assertEqual(ct, InfoType.NVT) - - def test_ovaldef(self): - ct = InfoType.from_string("ovaldef") - self.assertEqual(ct, InfoType.OVALDEF) - - def test_allinfo(self): - with self.assertRaises(InvalidArgument): - InfoType.from_string("allinfo") - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_permission_subject_type.py b/tests/protocols/gmpv208/enums/test_permission_subject_type.py deleted file mode 100644 index 34ebd6fcf..000000000 --- a/tests/protocols/gmpv208/enums/test_permission_subject_type.py +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import PermissionSubjectType - - -class GetPermissionSubjectTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - PermissionSubjectType.from_string("foo") - - def test_none_or_empty(self): - ct = PermissionSubjectType.from_string(None) - self.assertIsNone(ct) - ct = PermissionSubjectType.from_string("") - self.assertIsNone(ct) - - def test_user(self): - ct = PermissionSubjectType.from_string("user") - self.assertEqual(ct, PermissionSubjectType.USER) - - def test_role(self): - ct = PermissionSubjectType.from_string("role") - self.assertEqual(ct, PermissionSubjectType.ROLE) - - def test_group(self): - ct = PermissionSubjectType.from_string("group") - self.assertEqual(ct, PermissionSubjectType.GROUP) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_port_range_type.py b/tests/protocols/gmpv208/enums/test_port_range_type.py deleted file mode 100644 index cd4b1605c..000000000 --- a/tests/protocols/gmpv208/enums/test_port_range_type.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import PortRangeType - - -class GetPortRangeTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - PortRangeType.from_string("foo") - - def test_none_or_empty(self): - ct = PortRangeType.from_string(None) - self.assertIsNone(ct) - ct = PortRangeType.from_string("") - self.assertIsNone(ct) - - def test_tcp(self): - ct = PortRangeType.from_string("tcp") - self.assertEqual(ct, PortRangeType.TCP) - - def test_udp(self): - ct = PortRangeType.from_string("udp") - self.assertEqual(ct, PortRangeType.UDP) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_report_format_type.py b/tests/protocols/gmpv208/enums/test_report_format_type.py deleted file mode 100644 index ed2715843..000000000 --- a/tests/protocols/gmpv208/enums/test_report_format_type.py +++ /dev/null @@ -1,101 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208.entities.report_formats import ReportFormatType - - -class GetPortRangeTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - ReportFormatType.from_string("foo") - - def test_none_or_empty(self): - ct = ReportFormatType.from_string(None) - self.assertIsNone(ct) - ct = ReportFormatType.from_string("") - self.assertIsNone(ct) - - def test_anonymous_pdf(self): - ct = ReportFormatType.from_string("anonymous xml") - self.assertEqual(ct, ReportFormatType.ANONYMOUS_XML) - - def test_arf(self): - ct = ReportFormatType.from_string("arf") - self.assertEqual(ct, ReportFormatType.ARF) - - def test_(self): - ct = ReportFormatType.from_string("cpe") - self.assertEqual(ct, ReportFormatType.CPE) - - def test_csv_hosts(self): - ct = ReportFormatType.from_string("csv hosts") - self.assertEqual(ct, ReportFormatType.CSV_HOSTS) - - def test_csv_results(self): - ct = ReportFormatType.from_string("csv results") - self.assertEqual(ct, ReportFormatType.CSV_RESULTS) - - def test_gcr_pdf(self): - ct = ReportFormatType.from_string("gcr pdf") - self.assertEqual(ct, ReportFormatType.GCR_PDF) - - def test_gsr_html(self): - ct = ReportFormatType.from_string("gsr html") - self.assertEqual(ct, ReportFormatType.GSR_HTML) - - def test_gsr_pdf(self): - ct = ReportFormatType.from_string("gsr pdf") - self.assertEqual(ct, ReportFormatType.GSR_PDF) - - def test_gxcr_pdf(self): - ct = ReportFormatType.from_string("gxcr pdf") - self.assertEqual(ct, ReportFormatType.GXCR_PDF) - - def test_gxr_pdf(self): - ct = ReportFormatType.from_string("gxr pdf") - self.assertEqual(ct, ReportFormatType.GXR_PDF) - - def test_itg(self): - ct = ReportFormatType.from_string("itg") - self.assertEqual(ct, ReportFormatType.ITG) - - def test_latex(self): - ct = ReportFormatType.from_string("latex") - self.assertEqual(ct, ReportFormatType.LATEX) - - def test_nbe(self): - ct = ReportFormatType.from_string("nbe") - self.assertEqual(ct, ReportFormatType.NBE) - - def test_pdf(self): - ct = ReportFormatType.from_string("pdf") - self.assertEqual(ct, ReportFormatType.PDF) - - def test_svg(self): - ct = ReportFormatType.from_string("svg") - self.assertEqual(ct, ReportFormatType.SVG) - - def test_txt(self): - ct = ReportFormatType.from_string("txt") - self.assertEqual(ct, ReportFormatType.TXT) - - def test_verinice_ism(self): - ct = ReportFormatType.from_string("verinice ism") - self.assertEqual(ct, ReportFormatType.VERINICE_ISM) - - def test_verinice_itg(self): - ct = ReportFormatType.from_string("verinice itg") - self.assertEqual(ct, ReportFormatType.VERINICE_ITG) - - def test_xml(self): - ct = ReportFormatType.from_string("xml") - self.assertEqual(ct, ReportFormatType.XML) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_scanner_type.py b/tests/protocols/gmpv208/enums/test_scanner_type.py deleted file mode 100644 index 40bad2833..000000000 --- a/tests/protocols/gmpv208/enums/test_scanner_type.py +++ /dev/null @@ -1,60 +0,0 @@ -# SPDX-FileCopyrightText: 2020-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import ScannerType - - -class GetScannerTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - ScannerType.from_string("foo") - - def test_none_or_empty(self): - ct = ScannerType.from_string(None) - self.assertIsNone(ct) - ct = ScannerType.from_string("") - self.assertIsNone(ct) - - def test_osp_scanner(self): - ct = ScannerType.from_string("1") - self.assertEqual(ct, ScannerType.OSP_SCANNER_TYPE) - - ct = ScannerType.from_string("osp") - self.assertEqual(ct, ScannerType.OSP_SCANNER_TYPE) - - def test_openvas_scanner(self): - ct = ScannerType.from_string("2") - self.assertEqual(ct, ScannerType.OPENVAS_SCANNER_TYPE) - - ct = ScannerType.from_string("openvas") - self.assertEqual(ct, ScannerType.OPENVAS_SCANNER_TYPE) - - def test_cve_scanner(self): - ct = ScannerType.from_string("3") - self.assertEqual(ct, ScannerType.CVE_SCANNER_TYPE) - - ct = ScannerType.from_string("cve") - self.assertEqual(ct, ScannerType.CVE_SCANNER_TYPE) - - def test_gmp_scanner(self): - ct = ScannerType.from_string("4") - self.assertEqual(ct, ScannerType.GMP_SCANNER_TYPE) - - ct = ScannerType.from_string("gmp") - self.assertEqual(ct, ScannerType.GMP_SCANNER_TYPE) - - def test_greenbone_sensor_scanner(self): - ct = ScannerType.from_string("5") - self.assertEqual(ct, ScannerType.GREENBONE_SENSOR_SCANNER_TYPE) - - ct = ScannerType.from_string("greenbone") - self.assertEqual(ct, ScannerType.GREENBONE_SENSOR_SCANNER_TYPE) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_severity_level.py b/tests/protocols/gmpv208/enums/test_severity_level.py deleted file mode 100644 index c1192af7b..000000000 --- a/tests/protocols/gmpv208/enums/test_severity_level.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import SeverityLevel - - -class GetSeverityLevelFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - SeverityLevel.from_string("foo") - - def test_none_or_empty(self): - ct = SeverityLevel.from_string(None) - self.assertIsNone(ct) - ct = SeverityLevel.from_string("") - self.assertIsNone(ct) - - def test_high(self): - ct = SeverityLevel.from_string("High") - self.assertEqual(ct, SeverityLevel.HIGH) - - def test_medium(self): - ct = SeverityLevel.from_string("Medium") - self.assertEqual(ct, SeverityLevel.MEDIUM) - - def test_low(self): - ct = SeverityLevel.from_string("Low") - self.assertEqual(ct, SeverityLevel.LOW) - - def test_log(self): - ct = SeverityLevel.from_string("Log") - self.assertEqual(ct, SeverityLevel.LOG) - - def test_alarm(self): - ct = SeverityLevel.from_string("Alarm") - self.assertEqual(ct, SeverityLevel.ALARM) - - def test_debug(self): - ct = SeverityLevel.from_string("Debug") - self.assertEqual(ct, SeverityLevel.DEBUG) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_snmp_algorithms.py b/tests/protocols/gmpv208/enums/test_snmp_algorithms.py deleted file mode 100644 index bae39b35c..000000000 --- a/tests/protocols/gmpv208/enums/test_snmp_algorithms.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import SnmpAuthAlgorithm, SnmpPrivacyAlgorithm - - -class GetSnmpAuthAlgorithmFromStringTestCase(unittest.TestCase): - def test_invalid_status(self): - with self.assertRaises(InvalidArgument): - SnmpAuthAlgorithm.from_string("foo") - - def test_none_or_empty_type(self): - ts = SnmpAuthAlgorithm.from_string(None) - self.assertIsNone(ts) - ts = SnmpAuthAlgorithm.from_string("") - self.assertIsNone(ts) - - def test_sha1(self): - ts = SnmpAuthAlgorithm.from_string("sha1") - self.assertEqual(ts, SnmpAuthAlgorithm.SHA1) - - def test_md5(self): - ts = SnmpAuthAlgorithm.from_string("md5") - self.assertEqual(ts, SnmpAuthAlgorithm.MD5) - - -class GetSnmpPrivacyAlgorithmFromStringTestCase(unittest.TestCase): - def test_invalid_status(self): - with self.assertRaises(InvalidArgument): - SnmpPrivacyAlgorithm.from_string("foo") - - def test_none_or_empty_type(self): - ts = SnmpPrivacyAlgorithm.from_string(None) - self.assertIsNone(ts) - ts = SnmpPrivacyAlgorithm.from_string("") - self.assertIsNone(ts) - - def test_aes(self): - ts = SnmpPrivacyAlgorithm.from_string("aes") - self.assertEqual(ts, SnmpPrivacyAlgorithm.AES) - - def test_des(self): - ts = SnmpPrivacyAlgorithm.from_string("des") - self.assertEqual(ts, SnmpPrivacyAlgorithm.DES) diff --git a/tests/protocols/gmpv208/enums/test_sort_order.py b/tests/protocols/gmpv208/enums/test_sort_order.py deleted file mode 100644 index 34b675c9b..000000000 --- a/tests/protocols/gmpv208/enums/test_sort_order.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2020-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import SortOrder - - -class GetSortOrderFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - SortOrder.from_string("foo") - - def test_none_or_empty(self): - ct = SortOrder.from_string(None) - self.assertIsNone(ct) - ct = SortOrder.from_string("") - self.assertIsNone(ct) - - def test_ascending(self): - ct = SortOrder.from_string("ascending") - self.assertEqual(ct, SortOrder.ASCENDING) - - def test_descending(self): - ct = SortOrder.from_string("descending") - self.assertEqual(ct, SortOrder.DESCENDING) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/enums/test_ticket_status.py b/tests/protocols/gmpv208/enums/test_ticket_status.py deleted file mode 100644 index c0ca4bb3c..000000000 --- a/tests/protocols/gmpv208/enums/test_ticket_status.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import TicketStatus - - -class GetTicketStatusFromStringTestCase(unittest.TestCase): - def test_invalid_status(self): - with self.assertRaises(InvalidArgument): - TicketStatus.from_string("foo") - - def test_none_or_empty_type(self): - ts = TicketStatus.from_string(None) - self.assertIsNone(ts) - ts = TicketStatus.from_string("") - self.assertIsNone(ts) - - def test_ticket_status_open(self): - ts = TicketStatus.from_string("open") - self.assertEqual(ts, TicketStatus.OPEN) - - def test_ticket_status_fixed(self): - ts = TicketStatus.from_string("fixed") - self.assertEqual(ts, TicketStatus.FIXED) - - def test_ticket_status_closed(self): - ts = TicketStatus.from_string("closed") - self.assertEqual(ts, TicketStatus.CLOSED) diff --git a/tests/protocols/gmpv208/enums/test_user_auth_type.py b/tests/protocols/gmpv208/enums/test_user_auth_type.py deleted file mode 100644 index f572b1433..000000000 --- a/tests/protocols/gmpv208/enums/test_user_auth_type.py +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import UserAuthType - - -class GetUserAuthTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - UserAuthType.from_string("foo") - - def test_none_or_empty(self): - ct = UserAuthType.from_string(None) - self.assertIsNone(ct) - ct = UserAuthType.from_string("") - self.assertIsNone(ct) - - def test_file(self): - ct = UserAuthType.from_string("file") - self.assertEqual(ct, UserAuthType.FILE) - - def test_radius_connect(self): - ct = UserAuthType.from_string("radius_connect") - self.assertEqual(ct, UserAuthType.RADIUS_CONNECT) - - def test_ldap_connect(self): - ct = UserAuthType.from_string("ldap_connect") - self.assertEqual(ct, UserAuthType.LDAP_CONNECT) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv208/system/aggregates/test_get_aggregates.py b/tests/protocols/gmpv208/system/aggregates/test_get_aggregates.py index 71a9bdd64..30369768c 100644 --- a/tests/protocols/gmpv208/system/aggregates/test_get_aggregates.py +++ b/tests/protocols/gmpv208/system/aggregates/test_get_aggregates.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, InvalidArgumentType, RequiredArgument -from gvm.protocols.gmpv208 import AggregateStatistic, EntityType, SortOrder +from gvm.protocols.gmp.requests import AggregateStatistic, EntityType, SortOrder class GmpGetAggregatesTestMixin: diff --git a/tests/protocols/gmpv208/system/feed/test_get_feed.py b/tests/protocols/gmpv208/system/feed/test_get_feed.py index 284427c4f..f80b4970d 100644 --- a/tests/protocols/gmpv208/system/feed/test_get_feed.py +++ b/tests/protocols/gmpv208/system/feed/test_get_feed.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv208 import FeedType +from gvm.protocols.gmp.requests import FeedType class GmpGetFeedTestMixin: diff --git a/tests/protocols/gmpv208/system/help/test_help.py b/tests/protocols/gmpv208/system/help/test_help.py index 231dc671c..60bf6c093 100644 --- a/tests/protocols/gmpv208/system/help/test_help.py +++ b/tests/protocols/gmpv208/system/help/test_help.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import HelpFormat +from gvm.protocols.gmp.requests import HelpFormat class GmpHelpTestMixin: diff --git a/tests/protocols/gmpv208/system/test_aggregates.py b/tests/protocols/gmpv208/system/test_aggregates.py deleted file mode 100644 index 0387e5367..000000000 --- a/tests/protocols/gmpv208/system/test_aggregates.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .aggregates import GmpGetAggregatesTestMixin - - -class Gmpv208GetAggregatesTestCase(GmpGetAggregatesTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/system/test_authentication.py b/tests/protocols/gmpv208/system/test_authentication.py deleted file mode 100644 index af9b3c79e..000000000 --- a/tests/protocols/gmpv208/system/test_authentication.py +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .authentication import ( - GmpAuthenticateTestMixin, - GmpDescribeAuthTestMixin, - GmpModifyAuthTestMixin, -) - - -class Gmpv208AuthenticateTestCase(GmpAuthenticateTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208ModifyAuthTestCase(GmpModifyAuthTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208DescribeAuthCommandTestCase( - GmpDescribeAuthTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/system/test_feed.py b/tests/protocols/gmpv208/system/test_feed.py deleted file mode 100644 index 56fd9c388..000000000 --- a/tests/protocols/gmpv208/system/test_feed.py +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .feed import GmpGetFeedsTestMixin, GmpGetFeedTestMixin - - -class Gmpv208GetFeedTestCase(GmpGetFeedTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208GetFeedsTestCase(GmpGetFeedsTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/system/test_help.py b/tests/protocols/gmpv208/system/test_help.py deleted file mode 100644 index 50405a86a..000000000 --- a/tests/protocols/gmpv208/system/test_help.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .help import GmpHelpTestMixin - - -class Gmpv208HelpTestCase(GmpHelpTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/system/test_system_reports.py b/tests/protocols/gmpv208/system/test_system_reports.py deleted file mode 100644 index 7d855da4a..000000000 --- a/tests/protocols/gmpv208/system/test_system_reports.py +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .system_reports import GmpGetSystemReportsTestMixin - - -class Gmpv208GetSystemReportsTestCase( - GmpGetSystemReportsTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/system/test_trashcan.py b/tests/protocols/gmpv208/system/test_trashcan.py deleted file mode 100644 index 1d3aa4466..000000000 --- a/tests/protocols/gmpv208/system/test_trashcan.py +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .trashcan import GmpEmptyTrashcanTestMixin, GmpRestoreFromTrashcanTestMixin - - -class Gmpv208EmptyTrashcanTestCase(GmpEmptyTrashcanTestMixin, Gmpv208TestCase): - pass - - -class Gmpv208RestoreFromTrashcanTestCase( - GmpRestoreFromTrashcanTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/system/test_user_settings.py b/tests/protocols/gmpv208/system/test_user_settings.py deleted file mode 100644 index 6542e65a4..000000000 --- a/tests/protocols/gmpv208/system/test_user_settings.py +++ /dev/null @@ -1,29 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .user_settings import ( - GmpGetUserSettingsTestMixin, - GmpGetUserSettingTestMixin, - GmpModifyUserSettingTestMixin, -) - - -class Gmpv208GetUserSettingTestCase( - GmpGetUserSettingTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208GetUserSettingsTestCase( - GmpGetUserSettingsTestMixin, Gmpv208TestCase -): - pass - - -class Gmpv208ModifyUserSettingTestCase( - GmpModifyUserSettingTestMixin, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/system/test_versions.py b/tests/protocols/gmpv208/system/test_versions.py deleted file mode 100644 index 4c7216bc0..000000000 --- a/tests/protocols/gmpv208/system/test_versions.py +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208 import Gmpv208TestCase -from .versions import GmpGetProtocolVersionTestCase, GmpGetVersionTestCase - - -class Gmpv208GetVersionCommandTestCase(GmpGetVersionTestCase, Gmpv208TestCase): - pass - - -class Gmpv208GmpGetProtocolVersionTestCase( - GmpGetProtocolVersionTestCase, Gmpv208TestCase -): - pass diff --git a/tests/protocols/gmpv208/test_gmp_types.py b/tests/protocols/gmpv208/test_gmp_types.py index 81086c1cc..f3013ce57 100644 --- a/tests/protocols/gmpv208/test_gmp_types.py +++ b/tests/protocols/gmpv208/test_gmp_types.py @@ -3,9 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # -from gvm.protocols.gmpv208.entities.hosts import HostsOrdering - -from . import Gmpv208TestCase +from gvm.protocols.gmp.requests import HostsOrdering class GmpWithStatementTestMixin: @@ -31,7 +29,3 @@ def test_types(self): # Test, that the Enum class types are equal self.assertEqual(self.gmp.types.HostsOrdering, HostsOrdering) - - -class Gmpv208WithStatementTestCase(GmpWithStatementTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv208/test_with_statement.py b/tests/protocols/gmpv208/test_with_statement.py index cfd90e790..ff2bcc2bb 100644 --- a/tests/protocols/gmpv208/test_with_statement.py +++ b/tests/protocols/gmpv208/test_with_statement.py @@ -3,8 +3,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later # -from . import Gmpv208TestCase - class GmpWithStatementTestMixin: def test_with_statement(self): @@ -16,7 +14,3 @@ def test_with_statement(self): self.connection.connect.has_been_called() self.connection.disconnect.has_been_called() - - -class Gmpv208WithStatementTestCase(GmpWithStatementTestMixin, Gmpv208TestCase): - pass diff --git a/tests/protocols/gmpv214/__init__.py b/tests/protocols/gmpv214/__init__.py index 894cd0b9c..41d1402cd 100644 --- a/tests/protocols/gmpv214/__init__.py +++ b/tests/protocols/gmpv214/__init__.py @@ -2,12 +2,3 @@ # # SPDX-License-Identifier: GPL-3.0-or-later # - - -from gvm.protocols.gmpv214 import Gmp - -from .. import GmpTestCase - - -class Gmpv214TestCase(GmpTestCase): - gmp_class = Gmp diff --git a/tests/protocols/gmpv214/entities/__init__.py b/tests/protocols/gmpv214/entities/__init__.py deleted file mode 100644 index bcfceaa60..000000000 --- a/tests/protocols/gmpv214/entities/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# diff --git a/tests/protocols/gmpv214/entities/notes/test_create_note.py b/tests/protocols/gmpv214/entities/notes/test_create_note.py index 6baa7c31d..da840a38b 100644 --- a/tests/protocols/gmpv214/entities/notes/test_create_note.py +++ b/tests/protocols/gmpv214/entities/notes/test_create_note.py @@ -6,7 +6,7 @@ from decimal import Decimal from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv214 import SeverityLevel +from gvm.protocols.gmp.requests import SeverityLevel class GmpCreateNoteTestMixin: diff --git a/tests/protocols/gmpv214/entities/notes/test_modify_note.py b/tests/protocols/gmpv214/entities/notes/test_modify_note.py index 1284a3fd2..da0282807 100644 --- a/tests/protocols/gmpv214/entities/notes/test_modify_note.py +++ b/tests/protocols/gmpv214/entities/notes/test_modify_note.py @@ -6,7 +6,7 @@ from decimal import Decimal from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv214 import SeverityLevel +from gvm.protocols.gmp.requests import SeverityLevel class GmpModifyNoteTestMixin: diff --git a/tests/protocols/gmpv214/entities/overrides/test_create_override.py b/tests/protocols/gmpv214/entities/overrides/test_create_override.py index 387249462..22a871d11 100644 --- a/tests/protocols/gmpv214/entities/overrides/test_create_override.py +++ b/tests/protocols/gmpv214/entities/overrides/test_create_override.py @@ -6,7 +6,7 @@ from decimal import Decimal from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv214 import SeverityLevel +from gvm.protocols.gmp.requests import SeverityLevel class GmpCreateOverrideTestMixin: diff --git a/tests/protocols/gmpv214/entities/overrides/test_modify_override.py b/tests/protocols/gmpv214/entities/overrides/test_modify_override.py index ba6cb6b24..0fe65e980 100644 --- a/tests/protocols/gmpv214/entities/overrides/test_modify_override.py +++ b/tests/protocols/gmpv214/entities/overrides/test_modify_override.py @@ -6,7 +6,7 @@ from decimal import Decimal from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv214 import SeverityLevel +from gvm.protocols.gmp.requests import SeverityLevel class GmpModifyOverrideTestMixin: diff --git a/tests/protocols/gmpv214/entities/scanners/test_create_scanner.py b/tests/protocols/gmpv214/entities/scanners/test_create_scanner.py index a807c9fa1..1bb9cac2d 100644 --- a/tests/protocols/gmpv214/entities/scanners/test_create_scanner.py +++ b/tests/protocols/gmpv214/entities/scanners/test_create_scanner.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv214 import ScannerType +from gvm.protocols.gmp.requests import ScannerType class GmpCreateScannerTestMixin: diff --git a/tests/protocols/gmpv214/entities/scanners/test_modify_scanner.py b/tests/protocols/gmpv214/entities/scanners/test_modify_scanner.py index c1b74f688..be3fdc69a 100644 --- a/tests/protocols/gmpv214/entities/scanners/test_modify_scanner.py +++ b/tests/protocols/gmpv214/entities/scanners/test_modify_scanner.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv214 import ScannerType +from gvm.protocols.gmp.requests import ScannerType class GmpModifyScannerTestMixin: diff --git a/tests/protocols/gmpv214/entities/targets/test_create_target.py b/tests/protocols/gmpv214/entities/targets/test_create_target.py index 807dbc8ef..876e5dce6 100644 --- a/tests/protocols/gmpv214/entities/targets/test_create_target.py +++ b/tests/protocols/gmpv214/entities/targets/test_create_target.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv214.entities.targets import AliveTest +from gvm.protocols.gmp.requests import AliveTest class GmpCreateTargetTestMixin: diff --git a/tests/protocols/gmpv214/entities/targets/test_modify_target.py b/tests/protocols/gmpv214/entities/targets/test_modify_target.py index 5d25c267a..db2d1f21a 100644 --- a/tests/protocols/gmpv214/entities/targets/test_modify_target.py +++ b/tests/protocols/gmpv214/entities/targets/test_modify_target.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv214.entities.targets import AliveTest +from gvm.protocols.gmp.requests import AliveTest class GmpModifyTargetTestMixin: diff --git a/tests/protocols/gmpv214/entities/test_alerts.py b/tests/protocols/gmpv214/entities/test_alerts.py deleted file mode 100644 index 822c4e6d2..000000000 --- a/tests/protocols/gmpv214/entities/test_alerts.py +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.alerts import ( - GmpCloneAlertTestMixin, - GmpCreateAlertTestMixin, - GmpDeleteAlertTestMixin, - GmpGetAlertsTestMixin, - GmpGetAlertTestMixin, - GmpModifyAlertTestMixin, - GmpTestAlertTestMixin, - GmpTriggerAlertTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214CloneAlertTestCase(GmpCloneAlertTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateAlertTestCase(GmpCreateAlertTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214DeleteAlertTestCase(GmpDeleteAlertTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetAlertTestCase(GmpGetAlertTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetAlertsTestCase(GmpGetAlertsTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyAlertTestCase(GmpModifyAlertTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214TestAlertTestCase(GmpTestAlertTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214TriggerAlertTestCase(GmpTriggerAlertTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_audits.py b/tests/protocols/gmpv214/entities/test_audits.py deleted file mode 100644 index c1832ba4e..000000000 --- a/tests/protocols/gmpv214/entities/test_audits.py +++ /dev/null @@ -1,53 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.audits import ( - GmpCloneAuditTestMixin, - GmpCreateAuditTestMixin, - GmpDeleteAuditTestMixin, - GmpGetAuditsTestMixin, - GmpGetAuditTestMixin, - GmpModifyAuditTestMixin, - GmpResumeAuditTestMixin, - GmpStartAuditTestMixin, - GmpStopAuditTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214CloneAuditTestCase(GmpCloneAuditTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateAuditTestCase(GmpCreateAuditTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214DeleteAuditTestCase(GmpDeleteAuditTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetAuditTestCase(GmpGetAuditTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetAuditsTestCase(GmpGetAuditsTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyAuditTestCase(GmpModifyAuditTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ResumeAuditTestCase(GmpResumeAuditTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214StartAuditTestCase(GmpStartAuditTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214StopAuditTestCase(GmpStopAuditTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_credentials.py b/tests/protocols/gmpv214/entities/test_credentials.py deleted file mode 100644 index d26b5cfcd..000000000 --- a/tests/protocols/gmpv214/entities/test_credentials.py +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.credentials import ( - GmpCloneCredentialTestMixin, - GmpCreateCredentialTestMixin, - GmpDeleteCredentialTestMixin, - GmpGetCredentialsTestMixin, - GmpGetCredentialTestMixin, - GmpModifyCredentialTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214CloneCredentialTestCase( - GmpCloneCredentialTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214CreateCredentialTestCase( - GmpCreateCredentialTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214DeleteCredentialTestCase( - GmpDeleteCredentialTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetCredentialTestCase(GmpGetCredentialTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetCredentialsTestCase( - GmpGetCredentialsTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyCredentialTestCase( - GmpModifyCredentialTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_filters.py b/tests/protocols/gmpv214/entities/test_filters.py deleted file mode 100644 index 9a47044ae..000000000 --- a/tests/protocols/gmpv214/entities/test_filters.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.filters import ( - GmpCloneFilterTestMixin, - GmpCreateFilterTestMixin, - GmpDeleteFilterTestMixin, - GmpGetFiltersTestMixin, - GmpGetFilterTestMixin, - GmpModifyFilterTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeleteFilterTestCase(GmpDeleteFilterTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetFilterTestCase(GmpGetFilterTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetFiltersTestCase(GmpGetFiltersTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CloneFilterTestCase(GmpCloneFilterTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateFilterTestCase(GmpCreateFilterTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyFilterTestCase(GmpModifyFilterTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_groups.py b/tests/protocols/gmpv214/entities/test_groups.py deleted file mode 100644 index d0737590b..000000000 --- a/tests/protocols/gmpv214/entities/test_groups.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.groups import ( - GmpCloneGroupTestMixin, - GmpCreateGroupTestMixin, - GmpDeleteGroupTestMixin, - GmpGetGroupsTestMixin, - GmpGetGroupTestMixin, - GmpModifyGroupTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeleteGroupTestCase(GmpDeleteGroupTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetGroupTestCase(GmpGetGroupTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetGroupsTestCase(GmpGetGroupsTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CloneGroupTestCase(GmpCloneGroupTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateGroupTestCase(GmpCreateGroupTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyGroupTestCase(GmpModifyGroupTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_hosts.py b/tests/protocols/gmpv214/entities/test_hosts.py deleted file mode 100644 index e5ca14fdc..000000000 --- a/tests/protocols/gmpv214/entities/test_hosts.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.hosts import ( - GmpCreateHostTestMixin, - GmpDeleteHostTestMixin, - GmpGetHostsTestMixin, - GmpGetHostTestMixin, - GmpModifyHostTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214CreateHostTestCase(GmpCreateHostTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214DeleteHostTestCase(GmpDeleteHostTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetHostTestCase(GmpGetHostTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetHostsTestCase(GmpGetHostsTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyHostTestCase(GmpModifyHostTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_notes.py b/tests/protocols/gmpv214/entities/test_notes.py deleted file mode 100644 index 962db7b23..000000000 --- a/tests/protocols/gmpv214/entities/test_notes.py +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.notes import ( - GmpCloneNoteTestMixin, - GmpDeleteNoteTestMixin, - GmpGetNotesTestMixin, - GmpGetNoteTestMixin, -) -from ...gmpv214 import Gmpv214TestCase -from .notes import GmpCreateNoteTestMixin, GmpModifyNoteTestMixin - - -class Gmpv214DeleteNoteTestCase(GmpDeleteNoteTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetNoteTestCase(GmpGetNoteTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetNotesTestCase(GmpGetNotesTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CloneNoteTestCase(GmpCloneNoteTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateNoteTestCase(GmpCreateNoteTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyNoteTestCase(GmpModifyNoteTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_operating_systems.py b/tests/protocols/gmpv214/entities/test_operating_systems.py deleted file mode 100644 index 10c74355f..000000000 --- a/tests/protocols/gmpv214/entities/test_operating_systems.py +++ /dev/null @@ -1,36 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.operating_systems import ( - GmpDeleteOperatingSystemTestMixin, - GmpGetOperatingSystemsTestMixin, - GmpGetOperatingSystemTestMixin, - GmpModifyOperatingSystemTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeleteOperatingSystemTestCase( - GmpDeleteOperatingSystemTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetOperatingSystemTestCase( - GmpGetOperatingSystemTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetOperatingSystemsTestCase( - GmpGetOperatingSystemsTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyOperatingSystemTestCase( - GmpModifyOperatingSystemTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_overrides.py b/tests/protocols/gmpv214/entities/test_overrides.py deleted file mode 100644 index f75a78d32..000000000 --- a/tests/protocols/gmpv214/entities/test_overrides.py +++ /dev/null @@ -1,43 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.overrides import ( - GmpCloneOverrideTestMixin, - GmpDeleteOverrideTestMixin, - GmpGetOverridesTestMixin, - GmpGetOverrideTestMixin, -) -from ...gmpv214 import Gmpv214TestCase -from .overrides import GmpCreateOverrideTestMixin, GmpModifyOverrideTestMixin - - -class Gmpv214CloneOverrideTestCase(GmpCloneOverrideTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateOverrideTestCase( - GmpCreateOverrideTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214DeleteOverrideTestCase( - GmpDeleteOverrideTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetOverrideTestCase(GmpGetOverrideTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetOverridesTestCase(GmpGetOverridesTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyOverrideTestCase( - GmpModifyOverrideTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_permissions.py b/tests/protocols/gmpv214/entities/test_permissions.py deleted file mode 100644 index 921879a90..000000000 --- a/tests/protocols/gmpv214/entities/test_permissions.py +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.permissions import ( - GmpClonePermissionTestMixin, - GmpCreatePermissionTestMixin, - GmpDeletePermissionTestMixin, - GmpGetPermissionsTestMixin, - GmpGetPermissionTestMixin, - GmpModifyPermissionTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeletePermissionTestCase( - GmpDeletePermissionTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetPermissionTestCase(GmpGetPermissionTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetPermissionsTestCase( - GmpGetPermissionsTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ClonePermissionTestCase( - GmpClonePermissionTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214CreatePermissionTestCase( - GmpCreatePermissionTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyPermissionTestCase( - GmpModifyPermissionTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_policies.py b/tests/protocols/gmpv214/entities/test_policies.py deleted file mode 100644 index ed87cbde4..000000000 --- a/tests/protocols/gmpv214/entities/test_policies.py +++ /dev/null @@ -1,80 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.policies import ( - GmpClonePolicyTestMixin, - GmpCreatePolicyTestMixin, - GmpDeletePolicyTestMixin, - GmpGetPoliciesTestMixin, - GmpGetPolicyTestMixin, - GmpImportPolicyTestMixin, - GmpModifyPolicySetCommentTestMixin, - GmpModifyPolicySetFamilySelectionTestMixin, - GmpModifyPolicySetNameTestMixin, - GmpModifyPolicySetNvtPreferenceTestMixin, - GmpModifyPolicySetNvtSelectionTestMixin, - GmpModifyPolicySetScannerPreferenceTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214ClonePolicyTestCase(GmpClonePolicyTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreatePolicyTestCase(GmpCreatePolicyTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214DeletePolicyTestCase(GmpDeletePolicyTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetPolicyTestCase(GmpGetPolicyTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetPoliciesTestCase(GmpGetPoliciesTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ImportPolicyTestCase(GmpImportPolicyTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyPolicySetCommentTestCase( - GmpModifyPolicySetCommentTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyPolicySetFamilySelectionTestCase( - GmpModifyPolicySetFamilySelectionTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyPolicySetNvtSelectionTestCase( - GmpModifyPolicySetNvtSelectionTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyPolicySetNameTestCase( - GmpModifyPolicySetNameTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyPolicySetNvtPreferenceTestCase( - GmpModifyPolicySetNvtPreferenceTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyPolicySetScannerPreferenceTestCase( - GmpModifyPolicySetScannerPreferenceTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_port_lists.py b/tests/protocols/gmpv214/entities/test_port_lists.py deleted file mode 100644 index 8d129c133..000000000 --- a/tests/protocols/gmpv214/entities/test_port_lists.py +++ /dev/null @@ -1,58 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.port_lists import ( - GmpClonePortListTestMixin, - GmpCreatePortListTestMixin, - GmpCreatePortRangeTestMixin, - GmpDeletePortListTestMixin, - GmpDeletePortRangeTestMixin, - GmpGetPortListsTestMixin, - GmpGetPortListTestMixin, - GmpModifyPortListTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214ClonePortListTestCase(GmpClonePortListTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreatePortListTestCase( - GmpCreatePortListTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214CreatePortRangeListTestCase( - GmpCreatePortRangeTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214DeletePortListTestCase( - GmpDeletePortListTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214DeletePortRangeTestCase( - GmpDeletePortRangeTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetPortListTestCase(GmpGetPortListTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetPortListsTestCase(GmpGetPortListsTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyPortListTestCase( - GmpModifyPortListTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_report_formats.py b/tests/protocols/gmpv214/entities/test_report_formats.py deleted file mode 100644 index 2ac69ccc1..000000000 --- a/tests/protocols/gmpv214/entities/test_report_formats.py +++ /dev/null @@ -1,57 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.report_formats import ( - GmpCloneReportFormatTestMixin, - GmpDeleteReportFormatTestMixin, - GmpGetReportFormatsTestMixin, - GmpGetReportFormatTestMixin, - GmpImportReportFormatTestMixin, - GmpModifyReportFormatTestMixin, - GmpVerifyReportFormatTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeleteReportFormatTestCase( - GmpDeleteReportFormatTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetReportFormatTestCase( - GmpGetReportFormatTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetReportFormatsTestCase( - GmpGetReportFormatsTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214CloneReportFormatTestCase( - GmpCloneReportFormatTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ImportReportFormatTestCase( - GmpImportReportFormatTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyReportFormatTestCase( - GmpModifyReportFormatTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214VerifyReportFormatTestCase( - GmpVerifyReportFormatTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_reports.py b/tests/protocols/gmpv214/entities/test_reports.py deleted file mode 100644 index 5d0c97bed..000000000 --- a/tests/protocols/gmpv214/entities/test_reports.py +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.reports import ( - GmpDeleteReportTestMixin, - GmpGetReportsTestMixin, - GmpGetReportTestMixin, - GmpImportReportTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeleteReportTestCase(GmpDeleteReportTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetReportTestCase(GmpGetReportTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetReportsTestCase(GmpGetReportsTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ImportReportTestCase(GmpImportReportTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_results.py b/tests/protocols/gmpv214/entities/test_results.py deleted file mode 100644 index 679df1c7d..000000000 --- a/tests/protocols/gmpv214/entities/test_results.py +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.results import ( - GmpGetResultsTestMixin, - GmpGetResultTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214GetResultTestCase(GmpGetResultTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetResultsTestCase(GmpGetResultsTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_roles.py b/tests/protocols/gmpv214/entities/test_roles.py deleted file mode 100644 index dbd6f42ab..000000000 --- a/tests/protocols/gmpv214/entities/test_roles.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.roles import ( - GmpCloneRoleTestMixin, - GmpCreateRoleTestMixin, - GmpDeleteRoleTestMixin, - GmpGetRolesTestMixin, - GmpGetRoleTestMixin, - GmpModifyRoleTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeleteRoleTestCase(GmpDeleteRoleTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetRoleTestCase(GmpGetRoleTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetRolesTestCase(GmpGetRolesTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CloneRoleTestCase(GmpCloneRoleTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateRoleTestCase(GmpCreateRoleTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyRoleTestCase(GmpModifyRoleTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_scan_configs.py b/tests/protocols/gmpv214/entities/test_scan_configs.py deleted file mode 100644 index f6f46e2b9..000000000 --- a/tests/protocols/gmpv214/entities/test_scan_configs.py +++ /dev/null @@ -1,111 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.scan_configs import ( - GmpCloneScanConfigTestMixin, - GmpCreateScanConfigFromOSPScannerTestMixin, - GmpCreateScanConfigTestMixin, - GmpDeleteScanConfigTestMixin, - GmpGetScanConfigsTestMixin, - GmpGetScanConfigTestMixin, - GmpImportScanConfigTestMixin, - GmpModifyScanConfigSetCommentTestMixin, - GmpModifyScanConfigSetFamilySelectionTestMixin, - GmpModifyScanConfigSetNameTestMixin, - GmpModifyScanConfigSetNvtPreferenceTestMixin, - GmpModifyScanConfigSetNvtSelectionTestMixin, - GmpModifyScanConfigSetScannerPreferenceTestMixin, - GmpModifyScanConfigTestMixin, - GmpSyncScanConfigTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214CloneScanConfigTestCase( - GmpCloneScanConfigTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214CreateScanConfigTestCase( - GmpCreateScanConfigTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214CreateScanConfigFromOSPScannerTestCase( - GmpCreateScanConfigFromOSPScannerTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214DeleteScanConfigTestCase( - GmpDeleteScanConfigTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetScanConfigTestCase(GmpGetScanConfigTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetScanConfigsTestCase( - GmpGetScanConfigsTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ImportScanConfigTestCase( - GmpImportScanConfigTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyScanConfigSetCommentTestCase( - GmpModifyScanConfigSetCommentTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyScanConfigSetFamilySelectionTestCase( - GmpModifyScanConfigSetFamilySelectionTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyScanConfigSetNvtSelectionTestCase( - GmpModifyScanConfigSetNvtSelectionTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyScanConfigSetNameTestCase( - GmpModifyScanConfigSetNameTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyScanConfigSetNvtPreferenceTestCase( - GmpModifyScanConfigSetNvtPreferenceTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyScanConfigSetScannerPreferenceTestCase( - GmpModifyScanConfigSetScannerPreferenceTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyScanConfigTestCase( - GmpModifyScanConfigTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214SyncScanConfigTestCase( - GmpSyncScanConfigTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_scanners.py b/tests/protocols/gmpv214/entities/test_scanners.py deleted file mode 100644 index baeb45b6d..000000000 --- a/tests/protocols/gmpv214/entities/test_scanners.py +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.scanners import ( - GmpCloneScannerTestMixin, - GmpDeleteScannerTestMixin, - GmpGetScannersTestMixin, - GmpGetScannerTestMixin, -) -from ...gmpv214 import Gmpv214TestCase -from .scanners import GmpCreateScannerTestMixin, GmpModifyScannerTestMixin - - -class Gmpv214DeleteScannerTestCase(GmpDeleteScannerTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetScannerTestCase(GmpGetScannerTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetScannersTestCase(GmpGetScannersTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CloneScannerTestCase(GmpCloneScannerTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateScannerTestCase(GmpCreateScannerTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyScannerTestCase(GmpModifyScannerTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_schedules.py b/tests/protocols/gmpv214/entities/test_schedules.py deleted file mode 100644 index 0547aee00..000000000 --- a/tests/protocols/gmpv214/entities/test_schedules.py +++ /dev/null @@ -1,44 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.schedules import ( - GmpCloneScheduleTestMixin, - GmpCreateScheduleTestMixin, - GmpDeleteScheduleTestMixin, - GmpGetSchedulesTestMixin, - GmpGetScheduleTestMixin, - GmpModifyScheduleTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeleteScheduleTestCase( - GmpDeleteScheduleTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetScheduleTestCase(GmpGetScheduleTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetSchedulesTestCase(GmpGetSchedulesTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CloneScheduleTestCase(GmpCloneScheduleTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateScheduleTestCase( - GmpCreateScheduleTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyScheduleTestCase( - GmpModifyScheduleTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_secinfo.py b/tests/protocols/gmpv214/entities/test_secinfo.py deleted file mode 100644 index 9fe6bb2fe..000000000 --- a/tests/protocols/gmpv214/entities/test_secinfo.py +++ /dev/null @@ -1,103 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.secinfo import ( - GmpGetCertBundListTestMixin, - GmpGetCertBundTestMixin, - GmpGetCpeListTestMixin, - GmpGetCpeTestMixin, - GmpGetCveListTestMixin, - GmpGetCveTestMixin, - GmpGetDfnCertListTestMixin, - GmpGetDfnCertTestMixin, - GmpGetInfoListTestMixin, - GmpGetInfoTestMixin, - GmpGetNvtFamiliesTestMixin, - GmpGetNvtListTestMixin, - GmpGetNvtTestMixin, - GmpGetOvalDefListTestMixin, - GmpGetOvalDefTestMixin, - GmpGetScanConfigNvtsTestMixin, - GmpGetScanConfigNvtTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214GetCertBundTestCase(GmpGetCertBundTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetCpeTestCase(GmpGetCpeTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetCveTestCase(GmpGetCveTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetDfnCertCase(GmpGetDfnCertTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetOvalDefCase(GmpGetOvalDefTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetInfoListTestCase(GmpGetInfoListTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetInfoTestCase(GmpGetInfoTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetNvtTestCase(GmpGetNvtTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetScanConfigNvtTestCase( - GmpGetScanConfigNvtTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetNvtFamiliesTestCase( - GmpGetNvtFamiliesTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetScanConfigNvtsTestCase( - GmpGetScanConfigNvtsTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetCertBundListTestCase( - GmpGetCertBundListTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetCpeListTestCase(GmpGetCpeListTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetCveListTestCase(GmpGetCveListTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetDfnCertListCase(GmpGetDfnCertListTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetNvtListTestCase(GmpGetNvtListTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetOvalDefListTestCase( - GmpGetOvalDefListTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_tags.py b/tests/protocols/gmpv214/entities/test_tags.py deleted file mode 100644 index 698761778..000000000 --- a/tests/protocols/gmpv214/entities/test_tags.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.tags import ( - GmpCloneTagTestMixin, - GmpCreateTagTestMixin, - GmpDeleteTagTestMixin, - GmpGetTagsTestMixin, - GmpGetTagTestMixin, - GmpModifyTagTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeleteTagTestCase(GmpDeleteTagTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetTagTestCase(GmpGetTagTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetTagsTestCase(GmpGetTagsTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CloneTagTestCase(GmpCloneTagTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateTagTestCase(GmpCreateTagTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyTagTestCase(GmpModifyTagTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_targets.py b/tests/protocols/gmpv214/entities/test_targets.py deleted file mode 100644 index ee00cb8da..000000000 --- a/tests/protocols/gmpv214/entities/test_targets.py +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.targets import ( - GmpCloneTargetTestMixin, - GmpDeleteTargetTestMixin, - GmpGetTargetsTestMixin, - GmpGetTargetTestMixin, -) -from ...gmpv214 import Gmpv214TestCase -from .targets import GmpCreateTargetTestMixin, GmpModifyTargetTestMixin - - -class Gmpv214CloneTargetTestCase(GmpCloneTargetTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateTargetTestCase(GmpCreateTargetTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214DeleteTargetTestCase(GmpDeleteTargetTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetTargetTestCase(GmpGetTargetTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetTargetsTestCase(GmpGetTargetsTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyTargetTestCase(GmpModifyTargetTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_tasks.py b/tests/protocols/gmpv214/entities/test_tasks.py deleted file mode 100644 index 60234ac66..000000000 --- a/tests/protocols/gmpv214/entities/test_tasks.py +++ /dev/null @@ -1,65 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.tasks import ( - GmpCloneTaskTestMixin, - GmpCreateContainerTaskTestMixin, - GmpCreateTaskTestMixin, - GmpDeleteTaskTestMixin, - GmpGetTasksTestMixin, - GmpGetTaskTestMixin, - GmpModifyTaskTestMixin, - GmpMoveTaskTestMixin, - GmpResumeTaskTestMixin, - GmpStartTaskTestMixin, - GmpStopTaskTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214CloneTaskTestCase(GmpCloneTaskTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateContainerTaskTestCase( - GmpCreateContainerTaskTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214CreateTaskTestCase(GmpCreateTaskTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214DeleteTaskTestCase(GmpDeleteTaskTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetTaskTestCase(GmpGetTaskTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetTasksTestCase(GmpGetTasksTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyTaskTestCase(GmpModifyTaskTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214MoveTaskTestCase(GmpMoveTaskTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ResumeTaskTestCase(GmpResumeTaskTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214StartTaskTestCase(GmpStartTaskTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214StopTaskTestCase(GmpStopTaskTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_tickets.py b/tests/protocols/gmpv214/entities/test_tickets.py deleted file mode 100644 index b98e55379..000000000 --- a/tests/protocols/gmpv214/entities/test_tickets.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.tickets import ( - GmpCloneTicketTestMixin, - GmpCreateTicketTestMixin, - GmpDeleteTicketTestMixin, - GmpGetTicketsTestMixin, - GmpGetTicketTestMixin, - GmpModifyTicketTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214DeleteTicketTestCase(GmpDeleteTicketTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetTicketTestCase(GmpGetTicketTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetTicketsTestCase(GmpGetTicketsTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CloneTicketTestCase(GmpCloneTicketTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateTicketTestCase(GmpCreateTicketTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyTicketTestCase(GmpModifyTicketTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_tls_certificates.py b/tests/protocols/gmpv214/entities/test_tls_certificates.py deleted file mode 100644 index 2e7589fa9..000000000 --- a/tests/protocols/gmpv214/entities/test_tls_certificates.py +++ /dev/null @@ -1,50 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.tls_certificates import ( - GmpCloneTLSCertificateTestMixin, - GmpCreateTLSCertificateTestMixin, - GmpDeleteTLSCertificateTestMixin, - GmpGetTLSCertificatesTestMixin, - GmpGetTLSCertificateTestMixin, - GmpModifyTLSCertificateTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214CloneTLSCertificateTestCase( - GmpCloneTLSCertificateTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214CreateTLSCertificateTestCase( - GmpCreateTLSCertificateTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214DeleteTLSCertificateTestCase( - GmpDeleteTLSCertificateTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetTLSCertificateTestCase( - GmpGetTLSCertificateTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetTLSCertificatesTestCase( - GmpGetTLSCertificatesTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyTLSCertificateTestCase( - GmpModifyTLSCertificateTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/test_users.py b/tests/protocols/gmpv214/entities/test_users.py deleted file mode 100644 index 14dc22bb7..000000000 --- a/tests/protocols/gmpv214/entities/test_users.py +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.users import ( - GmpCloneUserTestMixin, - GmpCreateUserTestMixin, - GmpDeleteUserTestMixin, - GmpGetUsersTestMixin, - GmpGetUserTestMixin, -) -from ...gmpv214 import Gmpv214TestCase -from .users import GmpModifyUserTestMixin - - -class Gmpv214CloneUserTestCase(GmpCloneUserTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214CreateUserTestCase(GmpCreateUserTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214DeleteUserTestCase(GmpDeleteUserTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetUserTestCase(GmpGetUserTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetUsersTestCase(GmpGetUsersTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyUserTestCase(GmpModifyUserTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/entities/test_vulnerabilities.py b/tests/protocols/gmpv214/entities/test_vulnerabilities.py deleted file mode 100644 index b59d42dc8..000000000 --- a/tests/protocols/gmpv214/entities/test_vulnerabilities.py +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.entities.vulnerabilities import ( - GmpGetVulnerabilitiesTestMixin, - GmpGetVulnerabilityTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214GetVulnerabilityTestCase( - GmpGetVulnerabilityTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetVulnerabilitiesTestCase( - GmpGetVulnerabilitiesTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/entities/users/test_modify_user.py b/tests/protocols/gmpv214/entities/users/test_modify_user.py index 124af2257..baf52fb29 100644 --- a/tests/protocols/gmpv214/entities/users/test_modify_user.py +++ b/tests/protocols/gmpv214/entities/users/test_modify_user.py @@ -4,7 +4,7 @@ # from gvm.errors import RequiredArgument -from gvm.protocols.gmpv214 import UserAuthType +from gvm.protocols.gmp.requests import UserAuthType class GmpModifyUserTestMixin: diff --git a/tests/protocols/gmpv214/enums/__init__.py b/tests/protocols/gmpv214/enums/__init__.py deleted file mode 100644 index 41d1402cd..000000000 --- a/tests/protocols/gmpv214/enums/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-FileCopyrightText: 2020-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# diff --git a/tests/protocols/gmpv214/enums/test_aggregate_statistic.py b/tests/protocols/gmpv214/enums/test_aggregate_statistic.py deleted file mode 100644 index d84dc7676..000000000 --- a/tests/protocols/gmpv214/enums/test_aggregate_statistic.py +++ /dev/null @@ -1,61 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import AggregateStatistic - - -class GetAggregateStatisticFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AggregateStatistic.from_string("foo") - - def test_none_or_empty(self): - ct = AggregateStatistic.from_string(None) - self.assertIsNone(ct) - ct = AggregateStatistic.from_string("") - self.assertIsNone(ct) - - def test_count(self): - ct = AggregateStatistic.from_string("count") - self.assertEqual(ct, AggregateStatistic.COUNT) - - def test_c_count(self): - ct = AggregateStatistic.from_string("c_count") - self.assertEqual(ct, AggregateStatistic.C_COUNT) - - def test_c_sum(self): - ct = AggregateStatistic.from_string("c_sum") - self.assertEqual(ct, AggregateStatistic.C_SUM) - - def test_max(self): - ct = AggregateStatistic.from_string("max") - self.assertEqual(ct, AggregateStatistic.MAX) - - def test_mean(self): - ct = AggregateStatistic.from_string("mean") - self.assertEqual(ct, AggregateStatistic.MEAN) - - def test_min(self): - ct = AggregateStatistic.from_string("min") - self.assertEqual(ct, AggregateStatistic.MIN) - - def test_sum(self): - ct = AggregateStatistic.from_string("sum") - self.assertEqual(ct, AggregateStatistic.SUM) - - def test_text(self): - ct = AggregateStatistic.from_string("text") - self.assertEqual(ct, AggregateStatistic.TEXT) - - def test_value(self): - ct = AggregateStatistic.from_string("value") - self.assertEqual(ct, AggregateStatistic.VALUE) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_alert_condition.py b/tests/protocols/gmpv214/enums/test_alert_condition.py deleted file mode 100644 index 95fd6b9ea..000000000 --- a/tests/protocols/gmpv214/enums/test_alert_condition.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import AlertCondition - - -class GetAlertConditionFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AlertCondition.from_string("foo") - - def test_none_or_empty(self): - ct = AlertCondition.from_string(None) - self.assertIsNone(ct) - ct = AlertCondition.from_string("") - self.assertIsNone(ct) - - def test_always(self): - ct = AlertCondition.from_string("always") - self.assertEqual(ct, AlertCondition.ALWAYS) - - def test_filter_count_at_least(self): - ct = AlertCondition.from_string("filter count at least") - self.assertEqual(ct, AlertCondition.FILTER_COUNT_AT_LEAST) - - def test_filter_count_changed(self): - ct = AlertCondition.from_string("filter count changed") - self.assertEqual(ct, AlertCondition.FILTER_COUNT_CHANGED) - - def test_severity_at_least(self): - ct = AlertCondition.from_string("severity at least") - self.assertEqual(ct, AlertCondition.SEVERITY_AT_LEAST) - - def test_severity_changed(self): - ct = AlertCondition.from_string("severity changed") - self.assertEqual(ct, AlertCondition.SEVERITY_CHANGED) - - def test_error(self): - ct = AlertCondition.from_string("error") - self.assertEqual(ct, AlertCondition.ERROR) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_alert_event.py b/tests/protocols/gmpv214/enums/test_alert_event.py deleted file mode 100644 index 23d53eed5..000000000 --- a/tests/protocols/gmpv214/enums/test_alert_event.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import AlertEvent - - -class GetAlertEventFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AlertEvent.from_string("foo") - - def test_none_or_empty(self): - ct = AlertEvent.from_string(None) - self.assertIsNone(ct) - ct = AlertEvent.from_string("") - self.assertIsNone(ct) - - def test_task_run_status_changed(self): - ct = AlertEvent.from_string("Task run status changed") - self.assertEqual(ct, AlertEvent.TASK_RUN_STATUS_CHANGED) - - def test_new_secinfo_arrived(self): - ct = AlertEvent.from_string("New SecInfo arrived") - self.assertEqual(ct, AlertEvent.NEW_SECINFO_ARRIVED) - - def test_updated_secinfo_arrived(self): - ct = AlertEvent.from_string("Updated SecInfo arrived") - self.assertEqual(ct, AlertEvent.UPDATED_SECINFO_ARRIVED) - - def test_ticket_received(self): - ct = AlertEvent.from_string("ticket received") - self.assertEqual(ct, AlertEvent.TICKET_RECEIVED) - - def test_assigned_ticket_changed(self): - ct = AlertEvent.from_string("assigned ticket changed") - self.assertEqual(ct, AlertEvent.ASSIGNED_TICKET_CHANGED) - - def test_owned_ticket_changed(self): - ct = AlertEvent.from_string("owned ticket changed") - self.assertEqual(ct, AlertEvent.OWNED_TICKET_CHANGED) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_alert_method.py b/tests/protocols/gmpv214/enums/test_alert_method.py deleted file mode 100644 index 4a09ab1b2..000000000 --- a/tests/protocols/gmpv214/enums/test_alert_method.py +++ /dev/null @@ -1,73 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import AlertMethod - - -class GetAlertMethodFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AlertMethod.from_string("foo") - - def test_none_or_empty(self): - ct = AlertMethod.from_string(None) - self.assertIsNone(ct) - ct = AlertMethod.from_string("") - self.assertIsNone(ct) - - def test_email(self): - ct = AlertMethod.from_string("email") - self.assertEqual(ct, AlertMethod.EMAIL) - - def test_scp(self): - ct = AlertMethod.from_string("scp") - self.assertEqual(ct, AlertMethod.SCP) - - def test_send(self): - ct = AlertMethod.from_string("send") - self.assertEqual(ct, AlertMethod.SEND) - - def test_smb(self): - ct = AlertMethod.from_string("smb") - self.assertEqual(ct, AlertMethod.SMB) - - def test_snmp(self): - ct = AlertMethod.from_string("snmp") - self.assertEqual(ct, AlertMethod.SNMP) - - def test_syslog(self): - ct = AlertMethod.from_string("syslog") - self.assertEqual(ct, AlertMethod.SYSLOG) - - def test_http_get(self): - ct = AlertMethod.from_string("HTTP Get") - self.assertEqual(ct, AlertMethod.HTTP_GET) - - def test_start_task(self): - ct = AlertMethod.from_string("Start Task") - self.assertEqual(ct, AlertMethod.START_TASK) - - def test_sourcefire_connector(self): - ct = AlertMethod.from_string("sourcefire Connector") - self.assertEqual(ct, AlertMethod.SOURCEFIRE_CONNECTOR) - - def test_verinice_connector(self): - ct = AlertMethod.from_string("verinice Connector") - self.assertEqual(ct, AlertMethod.VERINICE_CONNECTOR) - - def test_tippingpoint_sms(self): - ct = AlertMethod.from_string("Tippingpoint SMS") - self.assertEqual(ct, AlertMethod.TIPPINGPOINT_SMS) - - def test_alemba_vfire(self): - ct = AlertMethod.from_string("Alemba vFire") - self.assertEqual(ct, AlertMethod.ALEMBA_VFIRE) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_alive_test.py b/tests/protocols/gmpv214/enums/test_alive_test.py deleted file mode 100644 index 8674b00ad..000000000 --- a/tests/protocols/gmpv214/enums/test_alive_test.py +++ /dev/null @@ -1,65 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import AliveTest - - -class GetAliveTestFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - AliveTest.from_string("foo") - - def test_none_or_empty(self): - ct = AliveTest.from_string(None) - self.assertIsNone(ct) - ct = AliveTest.from_string("") - self.assertIsNone(ct) - - def test_scan_config_default(self): - ct = AliveTest.from_string("Scan Config Default") - self.assertEqual(ct, AliveTest.SCAN_CONFIG_DEFAULT) - - def test_icmp_ping(self): - ct = AliveTest.from_string("ICMP Ping") - self.assertEqual(ct, AliveTest.ICMP_PING) - - def test_tcp_ack_service_ping(self): - ct = AliveTest.from_string("TCP-ACK Service Ping") - self.assertEqual(ct, AliveTest.TCP_ACK_SERVICE_PING) - - def test_tcp_sync_service_ping(self): - ct = AliveTest.from_string("TCP-SYN Service Ping") - self.assertEqual(ct, AliveTest.TCP_SYN_SERVICE_PING) - - def test_arp_ping(self): - ct = AliveTest.from_string("ARP Ping") - self.assertEqual(ct, AliveTest.ARP_PING) - - def test_icmp_and_tcp_ack_service_ping(self): - ct = AliveTest.from_string("ICMP & TCP-ACK Service Ping") - self.assertEqual(ct, AliveTest.ICMP_AND_TCP_ACK_SERVICE_PING) - - def test_icmp_and_arp_ping(self): - ct = AliveTest.from_string("ICMP & ARP Ping") - self.assertEqual(ct, AliveTest.ICMP_AND_ARP_PING) - - def test_tcp_ack_service_and_arp_ping(self): - ct = AliveTest.from_string("TCP-ACK Service & ARP Ping") - self.assertEqual(ct, AliveTest.TCP_ACK_SERVICE_AND_ARP_PING) - - def test_icmp_tcp_ack_service_and_arp_ping(self): - ct = AliveTest.from_string("ICMP, TCP-ACK Service & ARP Ping") - self.assertEqual(ct, AliveTest.ICMP_TCP_ACK_SERVICE_AND_ARP_PING) - - def test_consider_alive(self): - ct = AliveTest.from_string("Consider Alive") - self.assertEqual(ct, AliveTest.CONSIDER_ALIVE) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_credential_format.py b/tests/protocols/gmpv214/enums/test_credential_format.py deleted file mode 100644 index aa09c92cc..000000000 --- a/tests/protocols/gmpv214/enums/test_credential_format.py +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import CredentialFormat - - -class GetCredentialFromatFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - CredentialFormat.from_string("foo") - - def test_none_or_empty(self): - ct = CredentialFormat.from_string(None) - self.assertIsNone(ct) - ct = CredentialFormat.from_string("") - self.assertIsNone(ct) - - def test_key(self): - ct = CredentialFormat.from_string("key") - self.assertEqual(ct, CredentialFormat.KEY) - - def test_rpm(self): - ct = CredentialFormat.from_string("rpm") - self.assertEqual(ct, CredentialFormat.RPM) - - def test_deb(self): - ct = CredentialFormat.from_string("deb") - self.assertEqual(ct, CredentialFormat.DEB) - - def test_exe(self): - ct = CredentialFormat.from_string("exe") - self.assertEqual(ct, CredentialFormat.EXE) - - def test_pem(self): - ct = CredentialFormat.from_string("pem") - self.assertEqual(ct, CredentialFormat.PEM) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_credential_type.py b/tests/protocols/gmpv214/enums/test_credential_type.py deleted file mode 100644 index 51a7358f8..000000000 --- a/tests/protocols/gmpv214/enums/test_credential_type.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import CredentialType - - -class GetCredentialTypeFromStringTestCase(unittest.TestCase): - def test_invalid_type(self): - with self.assertRaises(InvalidArgument): - CredentialType.from_string("foo") - - def test_none_or_empty_type(self): - ct = CredentialType.from_string(None) - self.assertIsNone(ct) - ct = CredentialType.from_string("") - self.assertIsNone(ct) - - def test_client_certificate(self): - ct = CredentialType.from_string("client_certificate") - self.assertEqual(ct, CredentialType.CLIENT_CERTIFICATE) - - def test_snmp(self): - ct = CredentialType.from_string("snmp") - self.assertEqual(ct, CredentialType.SNMP) - - def test_username_password(self): - ct = CredentialType.from_string("username_password") - self.assertEqual(ct, CredentialType.USERNAME_PASSWORD) - - def test_username_ssh_key(self): - ct = CredentialType.from_string("username_ssh_key") - self.assertEqual(ct, CredentialType.USERNAME_SSH_KEY) - - def test_smime_certificate(self): - ct = CredentialType.from_string("smime_certificate") - self.assertEqual(ct, CredentialType.SMIME_CERTIFICATE) - - def test_pgp_encryption_key(self): - ct = CredentialType.from_string("pgp_encryption_key") - self.assertEqual(ct, CredentialType.PGP_ENCRYPTION_KEY) - - def test_password_only(self): - ct = CredentialType.from_string("password_only") - self.assertEqual(ct, CredentialType.PASSWORD_ONLY) diff --git a/tests/protocols/gmpv214/enums/test_entity_type.py b/tests/protocols/gmpv214/enums/test_entity_type.py deleted file mode 100644 index 7582bf02e..000000000 --- a/tests/protocols/gmpv214/enums/test_entity_type.py +++ /dev/null @@ -1,166 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import EntityType - - -class GetEntityTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - EntityType.from_string("foo") - - def test_none_or_empty(self): - ct = EntityType.from_string(None) - self.assertIsNone(ct) - ct = EntityType.from_string("") - self.assertIsNone(ct) - - def test_audit(self): - ct = EntityType.from_string("audit") - self.assertEqual(ct, EntityType.AUDIT) - - def test_alert(self): - ct = EntityType.from_string("alert") - self.assertEqual(ct, EntityType.ALERT) - - def test_asset(self): - ct = EntityType.from_string("asset") - self.assertEqual(ct, EntityType.ASSET) - - def test_cert_bund_adv(self): - ct = EntityType.from_string("cert_bund_adv") - self.assertEqual(ct, EntityType.CERT_BUND_ADV) - - def test_cpe(self): - ct = EntityType.from_string("cpe") - self.assertEqual(ct, EntityType.CPE) - - def test_credential(self): - ct = EntityType.from_string("credential") - self.assertEqual(ct, EntityType.CREDENTIAL) - - def test_dfn_cert_adv(self): - ct = EntityType.from_string("dfn_cert_adv") - self.assertEqual(ct, EntityType.DFN_CERT_ADV) - - def test_filter(self): - ct = EntityType.from_string("filter") - self.assertEqual(ct, EntityType.FILTER) - - def test_group(self): - ct = EntityType.from_string("group") - self.assertEqual(ct, EntityType.GROUP) - - def test_host(self): - ct = EntityType.from_string("host") - self.assertEqual(ct, EntityType.HOST) - - def test_info(self): - ct = EntityType.from_string("info") - self.assertEqual(ct, EntityType.INFO) - - def test_note(self): - ct = EntityType.from_string("note") - self.assertEqual(ct, EntityType.NOTE) - - def test_nvt(self): - ct = EntityType.from_string("nvt") - self.assertEqual(ct, EntityType.NVT) - - def test_operating_system(self): - ct = EntityType.from_string("os") - self.assertEqual(ct, EntityType.OPERATING_SYSTEM) - - ct = EntityType.from_string("operating_system") - self.assertEqual(ct, EntityType.OPERATING_SYSTEM) - - def test_ovaldef(self): - ct = EntityType.from_string("ovaldef") - self.assertEqual(ct, EntityType.OVALDEF) - - def test_override(self): - ct = EntityType.from_string("override") - self.assertEqual(ct, EntityType.OVERRIDE) - - def test_permission(self): - ct = EntityType.from_string("permission") - self.assertEqual(ct, EntityType.PERMISSION) - - def test_policy(self): - ct = EntityType.from_string("policy") - self.assertEqual(ct, EntityType.POLICY) - - def test_port_list(self): - ct = EntityType.from_string("port_list") - self.assertEqual(ct, EntityType.PORT_LIST) - - def test_report(self): - ct = EntityType.from_string("report") - self.assertEqual(ct, EntityType.REPORT) - - def test_report_format(self): - ct = EntityType.from_string("report_format") - self.assertEqual(ct, EntityType.REPORT_FORMAT) - - def test_result(self): - ct = EntityType.from_string("result") - self.assertEqual(ct, EntityType.RESULT) - - def test_role(self): - ct = EntityType.from_string("role") - self.assertEqual(ct, EntityType.ROLE) - - def test_scan_config(self): - ct = EntityType.from_string("config") - self.assertEqual(ct, EntityType.SCAN_CONFIG) - - ct = EntityType.from_string("scan_config") - self.assertEqual(ct, EntityType.SCAN_CONFIG) - - def test_scanner(self): - ct = EntityType.from_string("scanner") - self.assertEqual(ct, EntityType.SCANNER) - - def test_schedule(self): - ct = EntityType.from_string("schedule") - self.assertEqual(ct, EntityType.SCHEDULE) - - def test_tag(self): - ct = EntityType.from_string("tag") - self.assertEqual(ct, EntityType.TAG) - - def test_target(self): - ct = EntityType.from_string("target") - self.assertEqual(ct, EntityType.TARGET) - - def test_task(self): - ct = EntityType.from_string("task") - self.assertEqual(ct, EntityType.TASK) - - def test_ticket(self): - ct = EntityType.from_string("ticket") - self.assertEqual(ct, EntityType.TICKET) - - def test_tls_certificate(self): - ft = EntityType.from_string("tls_certificate") - self.assertEqual(ft, EntityType.TLS_CERTIFICATE) - - def test_user(self): - ct = EntityType.from_string("user") - self.assertEqual(ct, EntityType.USER) - - def test_vulnerability(self): - ct = EntityType.from_string("vuln") - self.assertEqual(ct, EntityType.VULNERABILITY) - - ct = EntityType.from_string("vulnerability") - self.assertEqual(ct, EntityType.VULNERABILITY) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_feed_type.py b/tests/protocols/gmpv214/enums/test_feed_type.py deleted file mode 100644 index e9ddda256..000000000 --- a/tests/protocols/gmpv214/enums/test_feed_type.py +++ /dev/null @@ -1,41 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import FeedType - - -class GetFeedTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - FeedType.from_string("foo") - - def test_none_or_empty(self): - ct = FeedType.from_string(None) - self.assertIsNone(ct) - ct = FeedType.from_string("") - self.assertIsNone(ct) - - def test_nvt(self): - ct = FeedType.from_string("nvt") - self.assertEqual(ct, FeedType.NVT) - - def test_cert(self): - ct = FeedType.from_string("cert") - self.assertEqual(ct, FeedType.CERT) - - def test_scap(self): - ct = FeedType.from_string("scap") - self.assertEqual(ct, FeedType.SCAP) - - def test_gvmd_data(self): - ct = FeedType.from_string("gvmd_data") - self.assertEqual(ct, FeedType.GVMD_DATA) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_filter_type.py b/tests/protocols/gmpv214/enums/test_filter_type.py deleted file mode 100644 index 905e69925..000000000 --- a/tests/protocols/gmpv214/enums/test_filter_type.py +++ /dev/null @@ -1,138 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import FilterType - - -class GetFilterTypeFomStringTestCase(unittest.TestCase): - def test_filter_type_alert(self): - ft = FilterType.from_string("alert") - self.assertEqual(ft, FilterType.ALERT) - - def test_filter_type_asset(self): - ft = FilterType.from_string("asset") - self.assertEqual(ft, FilterType.ASSET) - - def test_filter_type_credential(self): - ft = FilterType.from_string("credential") - self.assertEqual(ft, FilterType.CREDENTIAL) - - def test_filter_type_filter(self): - ft = FilterType.from_string("filter") - self.assertEqual(ft, FilterType.FILTER) - - def test_filter_type_group(self): - ft = FilterType.from_string("group") - self.assertEqual(ft, FilterType.GROUP) - - def test_filter_type_host(self): - ft = FilterType.from_string("host") - self.assertEqual(ft, FilterType.HOST) - - def test_filter_type_note(self): - ft = FilterType.from_string("note") - self.assertEqual(ft, FilterType.NOTE) - - def test_filter_type_override(self): - ft = FilterType.from_string("override") - self.assertEqual(ft, FilterType.OVERRIDE) - - def test_filter_type_permission(self): - ft = FilterType.from_string("permission") - self.assertEqual(ft, FilterType.PERMISSION) - - def test_filter_type_port_list(self): - ft = FilterType.from_string("port_list") - self.assertEqual(ft, FilterType.PORT_LIST) - - def test_filter_type_report(self): - ft = FilterType.from_string("report") - self.assertEqual(ft, FilterType.REPORT) - - def test_filter_type_report_format(self): - ft = FilterType.from_string("report_format") - self.assertEqual(ft, FilterType.REPORT_FORMAT) - - def test_filter_type_result(self): - ft = FilterType.from_string("result") - self.assertEqual(ft, FilterType.RESULT) - - def test_filter_type_role(self): - ft = FilterType.from_string("role") - self.assertEqual(ft, FilterType.ROLE) - - def test_filter_type_schedule(self): - ft = FilterType.from_string("schedule") - self.assertEqual(ft, FilterType.SCHEDULE) - - def test_filter_type_secinfo(self): - ft = FilterType.from_string("secinfo") - self.assertEqual(ft, FilterType.ALL_SECINFO) - - def test_filter_type_all_secinfo(self): - ft = FilterType.from_string("all_secinfo") - self.assertEqual(ft, FilterType.ALL_SECINFO) - - def test_filter_type_tag(self): - ft = FilterType.from_string("tag") - self.assertEqual(ft, FilterType.TAG) - - def test_filter_type_task(self): - ft = FilterType.from_string("task") - self.assertEqual(ft, FilterType.TASK) - - def test_filter_type_target(self): - ft = FilterType.from_string("target") - self.assertEqual(ft, FilterType.TARGET) - - def test_filter_type_ticket(self): - ft = FilterType.from_string("ticket") - self.assertEqual(ft, FilterType.TICKET) - - def test_filter_type_tls_certificate(self): - ft = FilterType.from_string("tls_certificate") - self.assertEqual(ft, FilterType.TLS_CERTIFICATE) - - def test_filter_type_operating_system(self): - ft = FilterType.from_string("operating_system") - self.assertEqual(ft, FilterType.OPERATING_SYSTEM) - - def test_filter_type_user(self): - ft = FilterType.from_string("user") - self.assertEqual(ft, FilterType.USER) - - def test_filter_type_vuln(self): - ft = FilterType.from_string("vuln") - self.assertEqual(ft, FilterType.VULNERABILITY) - - def test_filter_type_vulnerability(self): - ft = FilterType.from_string("vulnerability") - self.assertEqual(ft, FilterType.VULNERABILITY) - - def test_filter_type_config(self): - ft = FilterType.from_string("config") - self.assertEqual(ft, FilterType.SCAN_CONFIG) - - def test_filter_type_scan_config(self): - ft = FilterType.from_string("scan_config") - self.assertEqual(ft, FilterType.SCAN_CONFIG) - - def test_filter_type_os(self): - ft = FilterType.from_string("os") - self.assertEqual(ft, FilterType.OPERATING_SYSTEM) - - def test_invalid_filter_type(self): - with self.assertRaises(InvalidArgument): - FilterType.from_string("foo") - - def test_non_or_empty_filter_type(self): - ft = FilterType.from_string(None) - self.assertIsNone(ft) - - ft = FilterType.from_string("") - self.assertIsNone(ft) diff --git a/tests/protocols/gmpv214/enums/test_help_format.py b/tests/protocols/gmpv214/enums/test_help_format.py deleted file mode 100644 index 8f594ce77..000000000 --- a/tests/protocols/gmpv214/enums/test_help_format.py +++ /dev/null @@ -1,41 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import HelpFormat - - -class GetHelpFormatFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - HelpFormat.from_string("foo") - - def test_none_or_empty(self): - ct = HelpFormat.from_string(None) - self.assertIsNone(ct) - ct = HelpFormat.from_string("") - self.assertIsNone(ct) - - def test_task_run_status_changed(self): - ct = HelpFormat.from_string("HtMl") - self.assertEqual(ct, HelpFormat.HTML) - - def test_new_secinfo_arrived(self): - ct = HelpFormat.from_string("rNc") - self.assertEqual(ct, HelpFormat.RNC) - - def test_updated_secinfo_arrived(self): - ct = HelpFormat.from_string("tExT") - self.assertEqual(ct, HelpFormat.TEXT) - - def test_ticket_received(self): - ct = HelpFormat.from_string("XmL") - self.assertEqual(ct, HelpFormat.XML) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_hosts_ordering.py b/tests/protocols/gmpv214/enums/test_hosts_ordering.py deleted file mode 100644 index 84c0146ba..000000000 --- a/tests/protocols/gmpv214/enums/test_hosts_ordering.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import HostsOrdering - - -class GetHostsOrderingFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - HostsOrdering.from_string("foo") - - def test_none_or_empty(self): - ct = HostsOrdering.from_string(None) - self.assertIsNone(ct) - ct = HostsOrdering.from_string("") - self.assertIsNone(ct) - - def test_sequential(self): - ct = HostsOrdering.from_string("sequential") - self.assertEqual(ct, HostsOrdering.SEQUENTIAL) - - def test_random(self): - ct = HostsOrdering.from_string("random") - self.assertEqual(ct, HostsOrdering.RANDOM) - - def test_reverse(self): - ct = HostsOrdering.from_string("reverse") - self.assertEqual(ct, HostsOrdering.REVERSE) diff --git a/tests/protocols/gmpv214/enums/test_info_type.py b/tests/protocols/gmpv214/enums/test_info_type.py deleted file mode 100644 index d91dd8951..000000000 --- a/tests/protocols/gmpv214/enums/test_info_type.py +++ /dev/null @@ -1,53 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import InfoType - - -class GetInfoTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - InfoType.from_string("foo") - - def test_none_or_empty(self): - ct = InfoType.from_string(None) - self.assertIsNone(ct) - ct = InfoType.from_string("") - self.assertIsNone(ct) - - def test_cert_bund_adv(self): - ct = InfoType.from_string("cert_bund_adv") - self.assertEqual(ct, InfoType.CERT_BUND_ADV) - - def test_cpe(self): - ct = InfoType.from_string("cpe") - self.assertEqual(ct, InfoType.CPE) - - def test_cve(self): - ct = InfoType.from_string("cve") - self.assertEqual(ct, InfoType.CVE) - - def test_dfn_cert_adv(self): - ct = InfoType.from_string("dfn_cert_adv") - self.assertEqual(ct, InfoType.DFN_CERT_ADV) - - def test_nvt(self): - ct = InfoType.from_string("nvt") - self.assertEqual(ct, InfoType.NVT) - - def test_ovaldef(self): - ct = InfoType.from_string("ovaldef") - self.assertEqual(ct, InfoType.OVALDEF) - - def test_allinfo(self): - with self.assertRaises(InvalidArgument): - InfoType.from_string("allinfo") - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_permission_subject_type.py b/tests/protocols/gmpv214/enums/test_permission_subject_type.py deleted file mode 100644 index e3e67d53a..000000000 --- a/tests/protocols/gmpv214/enums/test_permission_subject_type.py +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import PermissionSubjectType - - -class GetPermissionSubjectTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - PermissionSubjectType.from_string("foo") - - def test_none_or_empty(self): - ct = PermissionSubjectType.from_string(None) - self.assertIsNone(ct) - ct = PermissionSubjectType.from_string("") - self.assertIsNone(ct) - - def test_user(self): - ct = PermissionSubjectType.from_string("user") - self.assertEqual(ct, PermissionSubjectType.USER) - - def test_role(self): - ct = PermissionSubjectType.from_string("role") - self.assertEqual(ct, PermissionSubjectType.ROLE) - - def test_group(self): - ct = PermissionSubjectType.from_string("group") - self.assertEqual(ct, PermissionSubjectType.GROUP) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_port_range_type.py b/tests/protocols/gmpv214/enums/test_port_range_type.py deleted file mode 100644 index e4ca6f90a..000000000 --- a/tests/protocols/gmpv214/enums/test_port_range_type.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import PortRangeType - - -class GetPortRangeTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - PortRangeType.from_string("foo") - - def test_none_or_empty(self): - ct = PortRangeType.from_string(None) - self.assertIsNone(ct) - ct = PortRangeType.from_string("") - self.assertIsNone(ct) - - def test_tcp(self): - ct = PortRangeType.from_string("tcp") - self.assertEqual(ct, PortRangeType.TCP) - - def test_udp(self): - ct = PortRangeType.from_string("udp") - self.assertEqual(ct, PortRangeType.UDP) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_report_format_type.py b/tests/protocols/gmpv214/enums/test_report_format_type.py deleted file mode 100644 index 69457596d..000000000 --- a/tests/protocols/gmpv214/enums/test_report_format_type.py +++ /dev/null @@ -1,101 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import ReportFormatType - - -class GetPortRangeTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - ReportFormatType.from_string("foo") - - def test_none_or_empty(self): - ct = ReportFormatType.from_string(None) - self.assertIsNone(ct) - ct = ReportFormatType.from_string("") - self.assertIsNone(ct) - - def test_anonymous_pdf(self): - ct = ReportFormatType.from_string("anonymous xml") - self.assertEqual(ct, ReportFormatType.ANONYMOUS_XML) - - def test_arf(self): - ct = ReportFormatType.from_string("arf") - self.assertEqual(ct, ReportFormatType.ARF) - - def test_(self): - ct = ReportFormatType.from_string("cpe") - self.assertEqual(ct, ReportFormatType.CPE) - - def test_csv_hosts(self): - ct = ReportFormatType.from_string("csv hosts") - self.assertEqual(ct, ReportFormatType.CSV_HOSTS) - - def test_csv_results(self): - ct = ReportFormatType.from_string("csv results") - self.assertEqual(ct, ReportFormatType.CSV_RESULTS) - - def test_gcr_pdf(self): - ct = ReportFormatType.from_string("gcr pdf") - self.assertEqual(ct, ReportFormatType.GCR_PDF) - - def test_gsr_html(self): - ct = ReportFormatType.from_string("gsr html") - self.assertEqual(ct, ReportFormatType.GSR_HTML) - - def test_gsr_pdf(self): - ct = ReportFormatType.from_string("gsr pdf") - self.assertEqual(ct, ReportFormatType.GSR_PDF) - - def test_gxcr_pdf(self): - ct = ReportFormatType.from_string("gxcr pdf") - self.assertEqual(ct, ReportFormatType.GXCR_PDF) - - def test_gxr_pdf(self): - ct = ReportFormatType.from_string("gxr pdf") - self.assertEqual(ct, ReportFormatType.GXR_PDF) - - def test_itg(self): - ct = ReportFormatType.from_string("itg") - self.assertEqual(ct, ReportFormatType.ITG) - - def test_latex(self): - ct = ReportFormatType.from_string("latex") - self.assertEqual(ct, ReportFormatType.LATEX) - - def test_nbe(self): - ct = ReportFormatType.from_string("nbe") - self.assertEqual(ct, ReportFormatType.NBE) - - def test_pdf(self): - ct = ReportFormatType.from_string("pdf") - self.assertEqual(ct, ReportFormatType.PDF) - - def test_svg(self): - ct = ReportFormatType.from_string("svg") - self.assertEqual(ct, ReportFormatType.SVG) - - def test_txt(self): - ct = ReportFormatType.from_string("txt") - self.assertEqual(ct, ReportFormatType.TXT) - - def test_verinice_ism(self): - ct = ReportFormatType.from_string("verinice ism") - self.assertEqual(ct, ReportFormatType.VERINICE_ISM) - - def test_verinice_itg(self): - ct = ReportFormatType.from_string("verinice itg") - self.assertEqual(ct, ReportFormatType.VERINICE_ITG) - - def test_xml(self): - ct = ReportFormatType.from_string("xml") - self.assertEqual(ct, ReportFormatType.XML) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_scanner_type.py b/tests/protocols/gmpv214/enums/test_scanner_type.py deleted file mode 100644 index 8ac4bbe36..000000000 --- a/tests/protocols/gmpv214/enums/test_scanner_type.py +++ /dev/null @@ -1,60 +0,0 @@ -# SPDX-FileCopyrightText: 2020-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import ScannerType - - -class GetScannerTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - ScannerType.from_string("foo") - - def test_none_or_empty(self): - ct = ScannerType.from_string(None) - self.assertIsNone(ct) - ct = ScannerType.from_string("") - self.assertIsNone(ct) - - def test_osp_scanner(self): - ct = ScannerType.from_string("1") - self.assertEqual(ct, ScannerType.OSP_SCANNER_TYPE) - - ct = ScannerType.from_string("osp") - self.assertEqual(ct, ScannerType.OSP_SCANNER_TYPE) - - def test_openvas_scanner(self): - ct = ScannerType.from_string("2") - self.assertEqual(ct, ScannerType.OPENVAS_SCANNER_TYPE) - - ct = ScannerType.from_string("openvas") - self.assertEqual(ct, ScannerType.OPENVAS_SCANNER_TYPE) - - def test_cve_scanner(self): - ct = ScannerType.from_string("3") - self.assertEqual(ct, ScannerType.CVE_SCANNER_TYPE) - - ct = ScannerType.from_string("cve") - self.assertEqual(ct, ScannerType.CVE_SCANNER_TYPE) - - def test_gmp_scanner(self): - with self.assertRaises(InvalidArgument): - ScannerType.from_string("4") - - with self.assertRaises(InvalidArgument): - ScannerType.from_string("gmp") - - def test_greenbone_sensor_scanner(self): - ct = ScannerType.from_string("5") - self.assertEqual(ct, ScannerType.GREENBONE_SENSOR_SCANNER_TYPE) - - ct = ScannerType.from_string("greenbone") - self.assertEqual(ct, ScannerType.GREENBONE_SENSOR_SCANNER_TYPE) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_severity_level.py b/tests/protocols/gmpv214/enums/test_severity_level.py deleted file mode 100644 index 21cc77d71..000000000 --- a/tests/protocols/gmpv214/enums/test_severity_level.py +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-FileCopyrightText: 2020-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import SeverityLevel - - -class GetSeverityLevelFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - SeverityLevel.from_string("foo") - - def test_none_or_empty(self): - ct = SeverityLevel.from_string(None) - self.assertIsNone(ct) - ct = SeverityLevel.from_string("") - self.assertIsNone(ct) - - def test_high(self): - ct = SeverityLevel.from_string("High") - self.assertEqual(ct, SeverityLevel.HIGH) - - def test_medium(self): - ct = SeverityLevel.from_string("Medium") - self.assertEqual(ct, SeverityLevel.MEDIUM) - - def test_low(self): - ct = SeverityLevel.from_string("Low") - self.assertEqual(ct, SeverityLevel.LOW) - - def test_log(self): - ct = SeverityLevel.from_string("Log") - self.assertEqual(ct, SeverityLevel.LOG) - - def test_alarm(self): - ct = SeverityLevel.from_string("Alarm") - self.assertEqual(ct, SeverityLevel.ALARM) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_snmp_algorithms.py b/tests/protocols/gmpv214/enums/test_snmp_algorithms.py deleted file mode 100644 index 74c8d10c6..000000000 --- a/tests/protocols/gmpv214/enums/test_snmp_algorithms.py +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import SnmpAuthAlgorithm, SnmpPrivacyAlgorithm - - -class GetSnmpAuthAlgorithmFromStringTestCase(unittest.TestCase): - def test_invalid_status(self): - with self.assertRaises(InvalidArgument): - SnmpAuthAlgorithm.from_string("foo") - - def test_none_or_empty_type(self): - ts = SnmpAuthAlgorithm.from_string(None) - self.assertIsNone(ts) - ts = SnmpAuthAlgorithm.from_string("") - self.assertIsNone(ts) - - def test_sha1(self): - ts = SnmpAuthAlgorithm.from_string("sha1") - self.assertEqual(ts, SnmpAuthAlgorithm.SHA1) - - def test_md5(self): - ts = SnmpAuthAlgorithm.from_string("md5") - self.assertEqual(ts, SnmpAuthAlgorithm.MD5) - - -class GetSnmpPrivacyAlgorithmFromStringTestCase(unittest.TestCase): - def test_invalid_status(self): - with self.assertRaises(InvalidArgument): - SnmpPrivacyAlgorithm.from_string("foo") - - def test_none_or_empty_type(self): - ts = SnmpPrivacyAlgorithm.from_string(None) - self.assertIsNone(ts) - ts = SnmpPrivacyAlgorithm.from_string("") - self.assertIsNone(ts) - - def test_aes(self): - ts = SnmpPrivacyAlgorithm.from_string("aes") - self.assertEqual(ts, SnmpPrivacyAlgorithm.AES) - - def test_des(self): - ts = SnmpPrivacyAlgorithm.from_string("des") - self.assertEqual(ts, SnmpPrivacyAlgorithm.DES) diff --git a/tests/protocols/gmpv214/enums/test_sort_order.py b/tests/protocols/gmpv214/enums/test_sort_order.py deleted file mode 100644 index f37e7edb3..000000000 --- a/tests/protocols/gmpv214/enums/test_sort_order.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import SortOrder - - -class GetSortOrderFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - SortOrder.from_string("foo") - - def test_none_or_empty(self): - ct = SortOrder.from_string(None) - self.assertIsNone(ct) - ct = SortOrder.from_string("") - self.assertIsNone(ct) - - def test_ascending(self): - ct = SortOrder.from_string("ascending") - self.assertEqual(ct, SortOrder.ASCENDING) - - def test_descending(self): - ct = SortOrder.from_string("descending") - self.assertEqual(ct, SortOrder.DESCENDING) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/enums/test_ticket_status.py b/tests/protocols/gmpv214/enums/test_ticket_status.py deleted file mode 100644 index fed517462..000000000 --- a/tests/protocols/gmpv214/enums/test_ticket_status.py +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import TicketStatus - - -class GetTicketStatusFromStringTestCase(unittest.TestCase): - def test_invalid_status(self): - with self.assertRaises(InvalidArgument): - TicketStatus.from_string("foo") - - def test_none_or_empty_type(self): - ts = TicketStatus.from_string(None) - self.assertIsNone(ts) - ts = TicketStatus.from_string("") - self.assertIsNone(ts) - - def test_ticket_status_open(self): - ts = TicketStatus.from_string("open") - self.assertEqual(ts, TicketStatus.OPEN) - - def test_ticket_status_fixed(self): - ts = TicketStatus.from_string("fixed") - self.assertEqual(ts, TicketStatus.FIXED) - - def test_ticket_status_closed(self): - ts = TicketStatus.from_string("closed") - self.assertEqual(ts, TicketStatus.CLOSED) diff --git a/tests/protocols/gmpv214/enums/test_user_auth_type.py b/tests/protocols/gmpv214/enums/test_user_auth_type.py deleted file mode 100644 index c60451f47..000000000 --- a/tests/protocols/gmpv214/enums/test_user_auth_type.py +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv214 import UserAuthType - - -class GetUserAuthTypeFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - UserAuthType.from_string("foo") - - def test_none_or_empty(self): - ct = UserAuthType.from_string(None) - self.assertIsNone(ct) - ct = UserAuthType.from_string("") - self.assertIsNone(ct) - - def test_file(self): - ct = UserAuthType.from_string("file") - self.assertEqual(ct, UserAuthType.FILE) - - def test_radius_connect(self): - ct = UserAuthType.from_string("radius_connect") - self.assertEqual(ct, UserAuthType.RADIUS_CONNECT) - - def test_ldap_connect(self): - ct = UserAuthType.from_string("ldap_connect") - self.assertEqual(ct, UserAuthType.LDAP_CONNECT) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv214/system/test_aggregates.py b/tests/protocols/gmpv214/system/test_aggregates.py deleted file mode 100644 index 7097dc9f4..000000000 --- a/tests/protocols/gmpv214/system/test_aggregates.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.system.aggregates import GmpGetAggregatesTestMixin -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214GetAggregatesTestCase(GmpGetAggregatesTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/system/test_authentication.py b/tests/protocols/gmpv214/system/test_authentication.py deleted file mode 100644 index 3b49dfe97..000000000 --- a/tests/protocols/gmpv214/system/test_authentication.py +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.system.authentication import ( - GmpAuthenticateTestMixin, - GmpDescribeAuthTestMixin, - GmpModifyAuthTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214AuthenticateTestCase(GmpAuthenticateTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214ModifyAuthTestCase(GmpModifyAuthTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214DescribeAuthCommandTestCase( - GmpDescribeAuthTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/system/test_feed.py b/tests/protocols/gmpv214/system/test_feed.py deleted file mode 100644 index 0e97f9dae..000000000 --- a/tests/protocols/gmpv214/system/test_feed.py +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.system.feed import GmpGetFeedsTestMixin, GmpGetFeedTestMixin -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214GetFeedTestCase(GmpGetFeedTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214GetFeedsTestCase(GmpGetFeedsTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/system/test_help.py b/tests/protocols/gmpv214/system/test_help.py deleted file mode 100644 index cf31590b1..000000000 --- a/tests/protocols/gmpv214/system/test_help.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.system.help import GmpHelpTestMixin -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214HelpTestCase(GmpHelpTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/system/test_system_reports.py b/tests/protocols/gmpv214/system/test_system_reports.py deleted file mode 100644 index a116ae947..000000000 --- a/tests/protocols/gmpv214/system/test_system_reports.py +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-FileCopyrightText: 2019-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.system.system_reports import GmpGetSystemReportsTestMixin -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214GetSystemReportsTestCase( - GmpGetSystemReportsTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/system/test_trashcan.py b/tests/protocols/gmpv214/system/test_trashcan.py deleted file mode 100644 index 8ae1c8936..000000000 --- a/tests/protocols/gmpv214/system/test_trashcan.py +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.system.trashcan import ( - GmpEmptyTrashcanTestMixin, - GmpRestoreFromTrashcanTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214EmptyTrashcanTestCase(GmpEmptyTrashcanTestMixin, Gmpv214TestCase): - pass - - -class Gmpv214RestoreFromTrashcanTestCase( - GmpRestoreFromTrashcanTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/system/test_user_settings.py b/tests/protocols/gmpv214/system/test_user_settings.py deleted file mode 100644 index f31de3932..000000000 --- a/tests/protocols/gmpv214/system/test_user_settings.py +++ /dev/null @@ -1,29 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.system.user_settings import ( - GmpGetUserSettingsTestMixin, - GmpGetUserSettingTestMixin, - GmpModifyUserSettingTestMixin, -) -from ...gmpv214 import Gmpv214TestCase - - -class Gmpv214GetUserSettingTestCase( - GmpGetUserSettingTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214GetUserSettingsTestCase( - GmpGetUserSettingsTestMixin, Gmpv214TestCase -): - pass - - -class Gmpv214ModifyUserSettingTestCase( - GmpModifyUserSettingTestMixin, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/system/test_versions.py b/tests/protocols/gmpv214/system/test_versions.py deleted file mode 100644 index fd26ceba1..000000000 --- a/tests/protocols/gmpv214/system/test_versions.py +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -from ...gmpv208.system.versions import GmpGetVersionTestCase -from ...gmpv214 import Gmpv214TestCase -from .versions import GmpGetProtocolVersionTestCase - - -class Gmpv214GetVersionCommandTestCase(GmpGetVersionTestCase, Gmpv214TestCase): - pass - - -class Gmpv214GmpGetProtocolVersionTestCase( - GmpGetProtocolVersionTestCase, Gmpv214TestCase -): - pass diff --git a/tests/protocols/gmpv214/test_gmp_types.py b/tests/protocols/gmpv214/test_gmp_types.py index c18d9ae34..f3013ce57 100644 --- a/tests/protocols/gmpv214/test_gmp_types.py +++ b/tests/protocols/gmpv214/test_gmp_types.py @@ -3,9 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # -from gvm.protocols.gmpv208.entities.hosts import HostsOrdering - -from . import Gmpv214TestCase +from gvm.protocols.gmp.requests import HostsOrdering class GmpWithStatementTestMixin: @@ -31,7 +29,3 @@ def test_types(self): # Test, that the Enum class types are equal self.assertEqual(self.gmp.types.HostsOrdering, HostsOrdering) - - -class Gmpv214WithStatementTestCase(GmpWithStatementTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv214/test_with_statement.py b/tests/protocols/gmpv214/test_with_statement.py index 0341d3d1e..ff2bcc2bb 100644 --- a/tests/protocols/gmpv214/test_with_statement.py +++ b/tests/protocols/gmpv214/test_with_statement.py @@ -3,8 +3,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later # -from . import Gmpv214TestCase - class GmpWithStatementTestMixin: def test_with_statement(self): @@ -16,7 +14,3 @@ def test_with_statement(self): self.connection.connect.has_been_called() self.connection.disconnect.has_been_called() - - -class Gmpv214WithStatementTestCase(GmpWithStatementTestMixin, Gmpv214TestCase): - pass diff --git a/tests/protocols/gmpv224/entities/scanners/test_create_scanner.py b/tests/protocols/gmpv224/entities/scanners/test_create_scanner.py index 906303508..df81b4cdd 100644 --- a/tests/protocols/gmpv224/entities/scanners/test_create_scanner.py +++ b/tests/protocols/gmpv224/entities/scanners/test_create_scanner.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv224 import ScannerType +from gvm.protocols.gmp.requests import ScannerType class GmpCreateScannerTestMixin: diff --git a/tests/protocols/gmpv224/entities/scanners/test_modify_scanner.py b/tests/protocols/gmpv224/entities/scanners/test_modify_scanner.py index adc44ec60..f5e51cdc0 100644 --- a/tests/protocols/gmpv224/entities/scanners/test_modify_scanner.py +++ b/tests/protocols/gmpv224/entities/scanners/test_modify_scanner.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv224 import ScannerType +from gvm.protocols.gmp.requests import ScannerType class GmpModifyScannerTestMixin: diff --git a/tests/protocols/gmpv224/entities/targets/test_create_target.py b/tests/protocols/gmpv224/entities/targets/test_create_target.py index 35c972a8c..876e5dce6 100644 --- a/tests/protocols/gmpv224/entities/targets/test_create_target.py +++ b/tests/protocols/gmpv224/entities/targets/test_create_target.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv224 import AliveTest +from gvm.protocols.gmp.requests import AliveTest class GmpCreateTargetTestMixin: diff --git a/tests/protocols/gmpv224/entities/targets/test_modify_target.py b/tests/protocols/gmpv224/entities/targets/test_modify_target.py index 5d25c267a..db2d1f21a 100644 --- a/tests/protocols/gmpv224/entities/targets/test_modify_target.py +++ b/tests/protocols/gmpv224/entities/targets/test_modify_target.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv214.entities.targets import AliveTest +from gvm.protocols.gmp.requests import AliveTest class GmpModifyTargetTestMixin: diff --git a/tests/protocols/gmpv224/entities/users/test_modify_user.py b/tests/protocols/gmpv224/entities/users/test_modify_user.py index 31cabfd90..ad8802cd1 100644 --- a/tests/protocols/gmpv224/entities/users/test_modify_user.py +++ b/tests/protocols/gmpv224/entities/users/test_modify_user.py @@ -4,7 +4,7 @@ # from gvm.errors import RequiredArgument -from gvm.protocols.gmpv224 import UserAuthType +from gvm.protocols.gmp.requests import UserAuthType class GmpModifyUserTestMixin: diff --git a/tests/protocols/gmpv224/enums/test_aggregate_statistic.py b/tests/protocols/gmpv224/enums/test_aggregate_statistic.py index d84dc7676..eaaf0dd9e 100644 --- a/tests/protocols/gmpv224/enums/test_aggregate_statistic.py +++ b/tests/protocols/gmpv224/enums/test_aggregate_statistic.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv208 import AggregateStatistic +from gvm.protocols.gmp.requests import AggregateStatistic class GetAggregateStatisticFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_alert_condition.py b/tests/protocols/gmpv224/enums/test_alert_condition.py index 5e942ad0f..8147a67cb 100644 --- a/tests/protocols/gmpv224/enums/test_alert_condition.py +++ b/tests/protocols/gmpv224/enums/test_alert_condition.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import AlertCondition +from gvm.protocols.gmp.requests import AlertCondition class GetAlertConditionFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_alert_event.py b/tests/protocols/gmpv224/enums/test_alert_event.py index bd7c03a30..338934400 100644 --- a/tests/protocols/gmpv224/enums/test_alert_event.py +++ b/tests/protocols/gmpv224/enums/test_alert_event.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import AlertEvent +from gvm.protocols.gmp.requests import AlertEvent class GetAlertEventFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_alert_method.py b/tests/protocols/gmpv224/enums/test_alert_method.py index e66c973b8..e01471025 100644 --- a/tests/protocols/gmpv224/enums/test_alert_method.py +++ b/tests/protocols/gmpv224/enums/test_alert_method.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import AlertMethod +from gvm.protocols.gmp.requests import AlertMethod class GetAlertMethodFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_alive_test.py b/tests/protocols/gmpv224/enums/test_alive_test.py index d57a869dd..35778537e 100644 --- a/tests/protocols/gmpv224/enums/test_alive_test.py +++ b/tests/protocols/gmpv224/enums/test_alive_test.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import AliveTest +from gvm.protocols.gmp.requests import AliveTest class GetAliveTestFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_credential_format.py b/tests/protocols/gmpv224/enums/test_credential_format.py index de9ecbe98..07a044970 100644 --- a/tests/protocols/gmpv224/enums/test_credential_format.py +++ b/tests/protocols/gmpv224/enums/test_credential_format.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import CredentialFormat +from gvm.protocols.gmp.requests import CredentialFormat class GetCredentialFromatFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_credential_type.py b/tests/protocols/gmpv224/enums/test_credential_type.py index 4a63b4888..f23331b93 100644 --- a/tests/protocols/gmpv224/enums/test_credential_type.py +++ b/tests/protocols/gmpv224/enums/test_credential_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import CredentialType +from gvm.protocols.gmp.requests import CredentialType class GetCredentialTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_entity_type.py b/tests/protocols/gmpv224/enums/test_entity_type.py index 87219f793..a88b0e4e4 100644 --- a/tests/protocols/gmpv224/enums/test_entity_type.py +++ b/tests/protocols/gmpv224/enums/test_entity_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import EntityType +from gvm.protocols.gmp.requests import EntityType class GetEntityTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_feed_type.py b/tests/protocols/gmpv224/enums/test_feed_type.py index ba067921d..c32e0d24e 100644 --- a/tests/protocols/gmpv224/enums/test_feed_type.py +++ b/tests/protocols/gmpv224/enums/test_feed_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import FeedType +from gvm.protocols.gmp.requests import FeedType class GetFeedTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_filter_type.py b/tests/protocols/gmpv224/enums/test_filter_type.py index 71216cb13..70fbdf0b3 100644 --- a/tests/protocols/gmpv224/enums/test_filter_type.py +++ b/tests/protocols/gmpv224/enums/test_filter_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import FilterType +from gvm.protocols.gmp.requests import FilterType class GetFilterTypeFomStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_help_format.py b/tests/protocols/gmpv224/enums/test_help_format.py index 58103807a..2bfbbca06 100644 --- a/tests/protocols/gmpv224/enums/test_help_format.py +++ b/tests/protocols/gmpv224/enums/test_help_format.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import HelpFormat +from gvm.protocols.gmp.requests import HelpFormat class GetHelpFormatFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_hosts_ordering.py b/tests/protocols/gmpv224/enums/test_hosts_ordering.py index 2f54dec3d..76336f804 100644 --- a/tests/protocols/gmpv224/enums/test_hosts_ordering.py +++ b/tests/protocols/gmpv224/enums/test_hosts_ordering.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import HostsOrdering +from gvm.protocols.gmp.requests import HostsOrdering class GetHostsOrderingFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_info_type.py b/tests/protocols/gmpv224/enums/test_info_type.py index 57c643d75..ed8d65a2f 100644 --- a/tests/protocols/gmpv224/enums/test_info_type.py +++ b/tests/protocols/gmpv224/enums/test_info_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import InfoType +from gvm.protocols.gmp.requests import InfoType class GetInfoTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_permission_subject_type.py b/tests/protocols/gmpv224/enums/test_permission_subject_type.py index e1bdb1802..14cde60b2 100644 --- a/tests/protocols/gmpv224/enums/test_permission_subject_type.py +++ b/tests/protocols/gmpv224/enums/test_permission_subject_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import PermissionSubjectType +from gvm.protocols.gmp.requests import PermissionSubjectType class GetPermissionSubjectTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_port_range_type.py b/tests/protocols/gmpv224/enums/test_port_range_type.py index c6741ae94..5b022b3e9 100644 --- a/tests/protocols/gmpv224/enums/test_port_range_type.py +++ b/tests/protocols/gmpv224/enums/test_port_range_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import PortRangeType +from gvm.protocols.gmp.requests import PortRangeType class GetPortRangeTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_report_format_type.py b/tests/protocols/gmpv224/enums/test_report_format_type.py index a4f95a96f..a7f8786fc 100644 --- a/tests/protocols/gmpv224/enums/test_report_format_type.py +++ b/tests/protocols/gmpv224/enums/test_report_format_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import ReportFormatType +from gvm.protocols.gmp.requests import ReportFormatType class GetPortRangeTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_scanner_type.py b/tests/protocols/gmpv224/enums/test_scanner_type.py index dac182ae7..d09a8e370 100644 --- a/tests/protocols/gmpv224/enums/test_scanner_type.py +++ b/tests/protocols/gmpv224/enums/test_scanner_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import ScannerType +from gvm.protocols.gmp.requests import ScannerType class GetScannerTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_severity_level.py b/tests/protocols/gmpv224/enums/test_severity_level.py deleted file mode 100644 index 4acf58714..000000000 --- a/tests/protocols/gmpv224/enums/test_severity_level.py +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-FileCopyrightText: 2020-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import SeverityLevel - - -class GetSeverityLevelFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - SeverityLevel.from_string("foo") - - def test_none_or_empty(self): - ct = SeverityLevel.from_string(None) - self.assertIsNone(ct) - ct = SeverityLevel.from_string("") - self.assertIsNone(ct) - - def test_high(self): - ct = SeverityLevel.from_string("High") - self.assertEqual(ct, SeverityLevel.HIGH) - - def test_medium(self): - ct = SeverityLevel.from_string("Medium") - self.assertEqual(ct, SeverityLevel.MEDIUM) - - def test_low(self): - ct = SeverityLevel.from_string("Low") - self.assertEqual(ct, SeverityLevel.LOW) - - def test_log(self): - ct = SeverityLevel.from_string("Log") - self.assertEqual(ct, SeverityLevel.LOG) - - def test_alarm(self): - ct = SeverityLevel.from_string("Alarm") - self.assertEqual(ct, SeverityLevel.ALARM) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv224/enums/test_snmp_algorithms.py b/tests/protocols/gmpv224/enums/test_snmp_algorithms.py index 492c86013..f22bf51eb 100644 --- a/tests/protocols/gmpv224/enums/test_snmp_algorithms.py +++ b/tests/protocols/gmpv224/enums/test_snmp_algorithms.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import SnmpAuthAlgorithm, SnmpPrivacyAlgorithm +from gvm.protocols.gmp.requests import SnmpAuthAlgorithm, SnmpPrivacyAlgorithm class GetSnmpAuthAlgorithmFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_sort_order.py b/tests/protocols/gmpv224/enums/test_sort_order.py index f6c4a077e..c7db7b260 100644 --- a/tests/protocols/gmpv224/enums/test_sort_order.py +++ b/tests/protocols/gmpv224/enums/test_sort_order.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import SortOrder +from gvm.protocols.gmp.requests import SortOrder class GetSortOrderFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_ticket_status.py b/tests/protocols/gmpv224/enums/test_ticket_status.py index f4c79f3ae..a9b50b0be 100644 --- a/tests/protocols/gmpv224/enums/test_ticket_status.py +++ b/tests/protocols/gmpv224/enums/test_ticket_status.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import TicketStatus +from gvm.protocols.gmp.requests import TicketStatus class GetTicketStatusFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv224/enums/test_user_auth_type.py b/tests/protocols/gmpv224/enums/test_user_auth_type.py index 67cfc5817..b5e0910bc 100644 --- a/tests/protocols/gmpv224/enums/test_user_auth_type.py +++ b/tests/protocols/gmpv224/enums/test_user_auth_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv224 import UserAuthType +from gvm.protocols.gmp.requests import UserAuthType class GetUserAuthTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/entities/resourcenames/test_get_resource_name.py b/tests/protocols/gmpv225/entities/resourcenames/test_get_resource_name.py index 4a6c670bf..8f6cc4842 100644 --- a/tests/protocols/gmpv225/entities/resourcenames/test_get_resource_name.py +++ b/tests/protocols/gmpv225/entities/resourcenames/test_get_resource_name.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv225 import ResourceType +from gvm.protocols.gmp.requests import ResourceType class GmpGetResourceNameTestMixin: diff --git a/tests/protocols/gmpv225/entities/resourcenames/test_get_resource_names_list.py b/tests/protocols/gmpv225/entities/resourcenames/test_get_resource_names_list.py index 4bf01aa66..f634aee59 100644 --- a/tests/protocols/gmpv225/entities/resourcenames/test_get_resource_names_list.py +++ b/tests/protocols/gmpv225/entities/resourcenames/test_get_resource_names_list.py @@ -4,7 +4,7 @@ # from gvm.errors import InvalidArgument, RequiredArgument -from gvm.protocols.gmpv225 import ResourceType +from gvm.protocols.gmp.requests import ResourceType class GmpGetResourceNamesListTestMixin: diff --git a/tests/protocols/gmpv225/enums/test_aggregate_statistic.py b/tests/protocols/gmpv225/enums/test_aggregate_statistic.py index 00591495b..4193c1dc5 100644 --- a/tests/protocols/gmpv225/enums/test_aggregate_statistic.py +++ b/tests/protocols/gmpv225/enums/test_aggregate_statistic.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import AggregateStatistic +from gvm.protocols.gmp.requests import AggregateStatistic class GetAggregateStatisticFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_alert_condition.py b/tests/protocols/gmpv225/enums/test_alert_condition.py index c9dde9f00..ba65ed5fb 100644 --- a/tests/protocols/gmpv225/enums/test_alert_condition.py +++ b/tests/protocols/gmpv225/enums/test_alert_condition.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import AlertCondition +from gvm.protocols.gmp.requests import AlertCondition class GetAlertConditionFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_alert_event.py b/tests/protocols/gmpv225/enums/test_alert_event.py index c2797096e..939a51a21 100644 --- a/tests/protocols/gmpv225/enums/test_alert_event.py +++ b/tests/protocols/gmpv225/enums/test_alert_event.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import AlertEvent +from gvm.protocols.gmp.requests import AlertEvent class GetAlertEventFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_alert_method.py b/tests/protocols/gmpv225/enums/test_alert_method.py index 57bf56483..43a837c03 100644 --- a/tests/protocols/gmpv225/enums/test_alert_method.py +++ b/tests/protocols/gmpv225/enums/test_alert_method.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import AlertMethod +from gvm.protocols.gmp.requests import AlertMethod class GetAlertMethodFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_alive_test.py b/tests/protocols/gmpv225/enums/test_alive_test.py index abc790738..9ade849fd 100644 --- a/tests/protocols/gmpv225/enums/test_alive_test.py +++ b/tests/protocols/gmpv225/enums/test_alive_test.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import AliveTest +from gvm.protocols.gmp.requests import AliveTest class GetAliveTestFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_credential_format.py b/tests/protocols/gmpv225/enums/test_credential_format.py index 632a65906..452d1e243 100644 --- a/tests/protocols/gmpv225/enums/test_credential_format.py +++ b/tests/protocols/gmpv225/enums/test_credential_format.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import CredentialFormat +from gvm.protocols.gmp.requests import CredentialFormat class GetCredentialFromatFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_credential_type.py b/tests/protocols/gmpv225/enums/test_credential_type.py index 55916e489..f33ef66d5 100644 --- a/tests/protocols/gmpv225/enums/test_credential_type.py +++ b/tests/protocols/gmpv225/enums/test_credential_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import CredentialType +from gvm.protocols.gmp.requests import CredentialType class GetCredentialTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_entity_type.py b/tests/protocols/gmpv225/enums/test_entity_type.py index e821c5c81..7250b8e99 100644 --- a/tests/protocols/gmpv225/enums/test_entity_type.py +++ b/tests/protocols/gmpv225/enums/test_entity_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import EntityType +from gvm.protocols.gmp.requests import EntityType class GetEntityTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_feed_type.py b/tests/protocols/gmpv225/enums/test_feed_type.py index 7c99a39bb..d86919d81 100644 --- a/tests/protocols/gmpv225/enums/test_feed_type.py +++ b/tests/protocols/gmpv225/enums/test_feed_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import FeedType +from gvm.protocols.gmp.requests import FeedType class GetFeedTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_filter_type.py b/tests/protocols/gmpv225/enums/test_filter_type.py index 7d396d6c7..d275fc752 100644 --- a/tests/protocols/gmpv225/enums/test_filter_type.py +++ b/tests/protocols/gmpv225/enums/test_filter_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import FilterType +from gvm.protocols.gmp.requests import FilterType class GetFilterTypeFomStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_help_format.py b/tests/protocols/gmpv225/enums/test_help_format.py index ef893887e..569f9eeee 100644 --- a/tests/protocols/gmpv225/enums/test_help_format.py +++ b/tests/protocols/gmpv225/enums/test_help_format.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import HelpFormat +from gvm.protocols.gmp.requests import HelpFormat class GetHelpFormatFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_hosts_ordering.py b/tests/protocols/gmpv225/enums/test_hosts_ordering.py index b551a266c..2b8f56818 100644 --- a/tests/protocols/gmpv225/enums/test_hosts_ordering.py +++ b/tests/protocols/gmpv225/enums/test_hosts_ordering.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import HostsOrdering +from gvm.protocols.gmp.requests import HostsOrdering class GetHostsOrderingFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_info_type copy.py b/tests/protocols/gmpv225/enums/test_info_type copy.py index 17b138579..a2e7400d7 100644 --- a/tests/protocols/gmpv225/enums/test_info_type copy.py +++ b/tests/protocols/gmpv225/enums/test_info_type copy.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import InfoType +from gvm.protocols.gmp.requests import InfoType class GetInfoTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_permission_subject_type.py b/tests/protocols/gmpv225/enums/test_permission_subject_type.py index 221728cd8..56deae0e0 100644 --- a/tests/protocols/gmpv225/enums/test_permission_subject_type.py +++ b/tests/protocols/gmpv225/enums/test_permission_subject_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import PermissionSubjectType +from gvm.protocols.gmp.requests import PermissionSubjectType class GetPermissionSubjectTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_port_range_type.py b/tests/protocols/gmpv225/enums/test_port_range_type.py index b99b4ca20..9926beafc 100644 --- a/tests/protocols/gmpv225/enums/test_port_range_type.py +++ b/tests/protocols/gmpv225/enums/test_port_range_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import PortRangeType +from gvm.protocols.gmp.requests import PortRangeType class GetPortRangeTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_report_format_type.py b/tests/protocols/gmpv225/enums/test_report_format_type.py index 209a34250..9323166f6 100644 --- a/tests/protocols/gmpv225/enums/test_report_format_type.py +++ b/tests/protocols/gmpv225/enums/test_report_format_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import ReportFormatType +from gvm.protocols.gmp.requests import ReportFormatType class GetPortRangeTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_resource_type.py b/tests/protocols/gmpv225/enums/test_resource_type.py index 7e566a3df..7aa9a7448 100644 --- a/tests/protocols/gmpv225/enums/test_resource_type.py +++ b/tests/protocols/gmpv225/enums/test_resource_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import ResourceType +from gvm.protocols.gmp.requests import ResourceType class GetResourceTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_scanner_type.py b/tests/protocols/gmpv225/enums/test_scanner_type.py index 63bb392d9..ad534a4cc 100644 --- a/tests/protocols/gmpv225/enums/test_scanner_type.py +++ b/tests/protocols/gmpv225/enums/test_scanner_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import ScannerType +from gvm.protocols.gmp.requests import ScannerType class GetScannerTypeFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_severity_level.py b/tests/protocols/gmpv225/enums/test_severity_level.py deleted file mode 100644 index de598f0b0..000000000 --- a/tests/protocols/gmpv225/enums/test_severity_level.py +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2024 Greenbone AG -# -# SPDX-License-Identifier: GPL-3.0-or-later -# - -import unittest - -from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import SeverityLevel - - -class GetSeverityLevelFromStringTestCase(unittest.TestCase): - def test_invalid(self): - with self.assertRaises(InvalidArgument): - SeverityLevel.from_string("foo") - - def test_none_or_empty(self): - ct = SeverityLevel.from_string(None) - self.assertIsNone(ct) - ct = SeverityLevel.from_string("") - self.assertIsNone(ct) - - def test_high(self): - ct = SeverityLevel.from_string("High") - self.assertEqual(ct, SeverityLevel.HIGH) - - def test_medium(self): - ct = SeverityLevel.from_string("Medium") - self.assertEqual(ct, SeverityLevel.MEDIUM) - - def test_low(self): - ct = SeverityLevel.from_string("Low") - self.assertEqual(ct, SeverityLevel.LOW) - - def test_log(self): - ct = SeverityLevel.from_string("Log") - self.assertEqual(ct, SeverityLevel.LOG) - - def test_alarm(self): - ct = SeverityLevel.from_string("Alarm") - self.assertEqual(ct, SeverityLevel.ALARM) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/protocols/gmpv225/enums/test_snmp_algorithms.py b/tests/protocols/gmpv225/enums/test_snmp_algorithms.py index 2f7547726..998e4a587 100644 --- a/tests/protocols/gmpv225/enums/test_snmp_algorithms.py +++ b/tests/protocols/gmpv225/enums/test_snmp_algorithms.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import SnmpAuthAlgorithm, SnmpPrivacyAlgorithm +from gvm.protocols.gmp.requests import SnmpAuthAlgorithm, SnmpPrivacyAlgorithm class GetSnmpAuthAlgorithmFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_sort_order.py b/tests/protocols/gmpv225/enums/test_sort_order.py index 8aadfa150..714e99e7e 100644 --- a/tests/protocols/gmpv225/enums/test_sort_order.py +++ b/tests/protocols/gmpv225/enums/test_sort_order.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import SortOrder +from gvm.protocols.gmp.requests import SortOrder class GetSortOrderFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_ticket_status.py b/tests/protocols/gmpv225/enums/test_ticket_status.py index ce22e9899..f3ce5d5d9 100644 --- a/tests/protocols/gmpv225/enums/test_ticket_status.py +++ b/tests/protocols/gmpv225/enums/test_ticket_status.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import TicketStatus +from gvm.protocols.gmp.requests import TicketStatus class GetTicketStatusFromStringTestCase(unittest.TestCase): diff --git a/tests/protocols/gmpv225/enums/test_user_auth_type.py b/tests/protocols/gmpv225/enums/test_user_auth_type.py index 813ed5975..dfdd6d1bb 100644 --- a/tests/protocols/gmpv225/enums/test_user_auth_type.py +++ b/tests/protocols/gmpv225/enums/test_user_auth_type.py @@ -6,7 +6,7 @@ import unittest from gvm.errors import InvalidArgument -from gvm.protocols.gmpv225 import UserAuthType +from gvm.protocols.gmp.requests import UserAuthType class GetUserAuthTypeFromStringTestCase(unittest.TestCase):