コード例 #1
0
ファイル: test_get_cpes.py プロジェクト: y0urself/hyperion
class CPEsPaginationTestCase(SeleneTestCase):
    entity_name = 'info'
    gmp_cmd = 'get_info_list'
    selene_name = 'cpe'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.CPE,
    )
    test_counts = make_test_counts(
        entity_name, selene_name=selene_name, gmp_cmd=gmp_cmd, no_plural=True
    )
    test_page_info = make_test_page_info(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        query=GetCPEs,
        no_plural=True,
    )
    test_edges = make_test_edges(
        entity_name, gmp_cmd=gmp_cmd, selene_name=selene_name, no_plural=True
    )
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.CPE,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.CPE,
    )
コード例 #2
0
ファイル: test_get_audits.py プロジェクト: y0urself/hyperion
class AuditsPaginationTestCase(SeleneTestCase):
    gmp_name = 'task'
    selene_name = 'audit'
    gmp_cmd = 'get_audits'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name=gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        details=True,
    )
    test_counts = make_test_counts(
        gmp_name=gmp_name, selene_name=selene_name, gmp_cmd=gmp_cmd
    )
    test_page_info = make_test_page_info(
        gmp_name=gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        query=GetAudits,
    )
    test_edges = make_test_edges(
        gmp_name=gmp_name, selene_name=selene_name, gmp_cmd=gmp_cmd
    )
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name=gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        details=True,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name=gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        details=True,
    )
コード例 #3
0
class OperatingSystemsPaginationTestCase(SeleneTestCase):
    gmp_cmd = 'get_operating_systems'
    gmp_name = 'asset'
    selene_name = 'operatingSystem'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name=gmp_name, gmp_cmd=gmp_cmd, selene_name=selene_name
    )
    test_counts = make_test_counts(
        gmp_name=gmp_name, gmp_cmd=gmp_cmd, selene_name=selene_name
    )
    test_page_info = make_test_page_info(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        query=GetOperatingSystems,
    )
    test_edges = make_test_edges(
        gmp_name=gmp_name, gmp_cmd=gmp_cmd, selene_name=selene_name
    )
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
    )
コード例 #4
0
ファイル: test_get_hosts.py プロジェクト: greenbone/hyperion
class HostsPaginationTestCase(SeleneTestCase):
    gmp_cmd = 'get_hosts'
    gmp_name = 'asset'
    selene_name = 'host'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name=gmp_name, gmp_cmd=gmp_cmd, selene_name=selene_name)
    test_counts = make_test_counts(gmp_name=gmp_name,
                                   gmp_cmd=gmp_cmd,
                                   selene_name=selene_name)
    test_page_info = make_test_page_info(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        query=GetHosts,
    )
    test_edges = make_test_edges(gmp_name=gmp_name,
                                 gmp_cmd=gmp_cmd,
                                 selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name=gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
    )
コード例 #5
0
class SchedulesPaginationTestCase(SeleneTestCase):
    gmp_name = 'schedule'
    test_pagination_with_after_and_first = make_test_after_first(gmp_name)
    test_counts = make_test_counts(gmp_name)
    test_page_info = make_test_page_info(gmp_name, query=GetSchedules)
    test_pagination_with_before_and_last = make_test_before_last(gmp_name)
    test_edges = make_test_edges(gmp_name)
    test_after_first_before_last = make_test_after_first_before_last(gmp_name)
コード例 #6
0
class ResultsPaginationTestCase(SeleneTestCase):
    entity_name = 'result'
    test_pagination_with_after_and_first = make_test_after_first(entity_name)
    test_counts = make_test_counts(entity_name)
    test_page_info = make_test_page_info(entity_name, query=GetResults)
    test_pagination_with_before_and_last = make_test_before_last(entity_name)
    test_edges = make_test_edges(entity_name)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name)
コード例 #7
0
class TicketsPaginationTestCase(SeleneTestCase):
    entity_name = 'ticket'
    edge_name = 'remediationticket'
    test_pagination_with_after_and_first = make_test_after_first(entity_name)
    test_counts = make_test_counts(entity_name)
    test_get_page_info = make_test_page_info(entity_name, query=GetTickets)
    test_edges = make_test_edges(entity_name, edge_name=edge_name)
    test_pagination_with_before_and_last = make_test_before_last(entity_name)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name)
コード例 #8
0
class AlertsPaginationTestCase(SeleneTestCase):
    gmp_name = 'alert'
    test_pagination_with_after_and_first = make_test_after_first(gmp_name,
                                                                 tasks=True)
    test_counts = make_test_counts(gmp_name)
    test_page_info = make_test_page_info(gmp_name, query=GetAlerts)
    test_pagination_with_before_and_last = make_test_before_last(gmp_name,
                                                                 tasks=True)
    test_edges = make_test_edges(gmp_name)
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name, tasks=True)
コード例 #9
0
ファイル: test_get_tasks.py プロジェクト: y0urself/hyperion
class TasksPaginationTestCase(SeleneTestCase):
    entity_name = 'task'
    test_pagination_with_after_and_first = make_test_after_first(entity_name,
                                                                 details=True)
    test_counts = make_test_counts(entity_name)
    test_page_info = make_test_page_info(entity_name, query=GetTasks)
    test_edges = make_test_edges(entity_name)
    test_pagination_with_before_and_last = make_test_before_last(entity_name,
                                                                 details=True)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name, details=True)
コード例 #10
0
class ReportFormatsPaginationTestCase(SeleneTestCase):
    gmp_name = 'report_format'
    selene_name = 'reportFormat'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name, selene_name=selene_name)
    test_counts = make_test_counts(gmp_name, selene_name=selene_name)
    test_page_info = make_test_page_info(gmp_name,
                                         selene_name=selene_name,
                                         query=GetReportFormats)
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name, selene_name=selene_name)
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name, selene_name=selene_name)
コード例 #11
0
class CredentialsPaginationTestCase(SeleneTestCase):
    gmp_name = 'credential'
    selene_name = 'credential'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name, selene_name=selene_name)
    test_counts = make_test_counts(gmp_name, selene_name=selene_name)
    test_page_info = make_test_page_info(gmp_name,
                                         selene_name=selene_name,
                                         query=GetCredentials)
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name, selene_name=selene_name)
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name, selene_name=selene_name)
コード例 #12
0
class CertBundAdvisoriessPaginationTestCase(SeleneTestCase):
    entity_name = 'info'
    gmp_cmd = 'get_info_list'
    selene_name = 'certbundadvisory'
    plural_selene_name = 'certBundAdvisories'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        info_type=GvmInfoType.CERT_BUND_ADV,
        details=True,
    )
    test_counts = make_test_counts(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        no_plural=True,
    )
    test_page_info = make_test_page_info(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        query=GetCertBundAdvisories,
        plural_selene_name=plural_selene_name,
        no_plural=True,
    )
    test_edges = make_test_edges(
        entity_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        no_plural=True,
    )
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        info_type=GvmInfoType.CERT_BUND_ADV,
        details=True,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        info_type=GvmInfoType.CERT_BUND_ADV,
        details=True,
    )
コード例 #13
0
class OvalDefinitionsPaginationTestCase(SeleneTestCase):
    entity_name = 'info'
    gmp_cmd = 'get_info_list'
    selene_name = 'ovalDefinition'
    plural_selene_name = 'ovalDefinitions'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.OVALDEF,
        details=True,
    )
    test_counts = make_test_counts(
        entity_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        no_plural=True,
    )
    test_page_info = make_test_page_info(
        entity_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_selene_name,
        query=GetOvalDefinitions,
        no_plural=True,
    )
    test_edges = make_test_edges(
        entity_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        no_plural=True,
    )
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.OVALDEF,
        details=True,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        info_type=GvmInfoType.OVALDEF,
        details=True,
    )
コード例 #14
0
class ScanConfigsPaginationTestCase(SeleneTestCase):
    gmp_name = 'config'
    selene_name = 'scanConfig'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name, selene_name=selene_name, details=False)
    test_counts = make_test_counts(gmp_name, selene_name=selene_name)
    test_page_info = make_test_page_info(gmp_name,
                                         selene_name=selene_name,
                                         query=GetScanConfigs)
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name, selene_name=selene_name, details=False)
    test_edges = make_test_edges(gmp_name, selene_name=selene_name)
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name, selene_name=selene_name, details=False)
コード例 #15
0
class HostsPaginationTestCase(SeleneTestCase):
    entity_name = 'asset'
    selene_name = 'host'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name, selene_name=selene_name, asset_type=AssetType.HOST)
    test_counts = make_test_counts(entity_name, selene_name=selene_name)
    test_page_info = make_test_page_info(entity_name,
                                         selene_name=selene_name,
                                         query=GetHosts)
    test_edges = make_test_edges(entity_name, selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name, selene_name=selene_name, asset_type=AssetType.HOST)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name, selene_name=selene_name, asset_type=AssetType.HOST)
コード例 #16
0
class TLSCertificatesPaginationTestCase(SeleneTestCase):
    entity_name = 'tls_certificate'
    selene_name = 'tlsCertificate'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name, selene_name=selene_name)
    test_counts = make_test_counts(entity_name, selene_name=selene_name)
    test_page_info = make_test_page_info(entity_name,
                                         selene_name=selene_name,
                                         query=GetTLSCertificates)
    test_edges = make_test_edges(entity_name, selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name, selene_name=selene_name)
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name, selene_name=selene_name)
コード例 #17
0
class PortListsPaginationTestCase(SeleneTestCase):
    gmp_name = 'port_list'
    selene_name = 'portList'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name, selene_name=selene_name, details=True)
    test_counts = make_test_counts(gmp_name, selene_name=selene_name)
    test_page_info = make_test_page_info(gmp_name,
                                         selene_name=selene_name,
                                         query=GetPortLists)
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name, selene_name=selene_name, details=True)
    test_edges = make_test_edges(gmp_name, selene_name=selene_name)
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name, selene_name=selene_name, details=True)
コード例 #18
0
ファイル: test_get_filters.py プロジェクト: y0urself/hyperion
class HostsPaginationTestCase(SeleneTestCase):
    entity_name = 'filter'
    selene_name = 'filter'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name, selene_name=selene_name, trash=False, alerts=False
    )
    test_counts = make_test_counts(entity_name, selene_name=selene_name)
    test_page_info = make_test_page_info(
        entity_name, selene_name=selene_name, query=GetFilters
    )
    test_edges = make_test_edges(entity_name, selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name, selene_name=selene_name, trash=False, alerts=False
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name, selene_name=selene_name, trash=False, alerts=False
    )
コード例 #19
0
class PoliciesPaginationTestCase(SeleneTestCase):
    gmp_name = 'config'
    gmp_cmd = 'get_policies'
    selene_name = 'policy'
    plural_name = 'policies'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_name,
        details=False,
    )
    test_counts = make_test_counts(
        gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        plural_selene_name=plural_name,
    )
    test_page_info = make_test_page_info(
        gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_name,
        query=GetPolicies,
    )
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_name,
        details=False,
    )
    test_edges = make_test_edges(
        gmp_name,
        gmp_cmd=gmp_cmd,
        selene_name=selene_name,
        plural_selene_name=plural_name,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name,
        selene_name=selene_name,
        gmp_cmd=gmp_cmd,
        plural_selene_name=plural_name,
        details=False,
    )
コード例 #20
0
class VulnerabilitiesPaginationTestCase(SeleneTestCase):
    gmp_name = 'vuln'
    selene_name = 'vulnerability'
    plural_selene_name = 'vulnerabilities'
    gmp_cmd = 'get_vulnerabilities'
    test_pagination_with_after_and_first = make_test_after_first(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
    test_counts = make_test_counts(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
    test_page_info = make_test_page_info(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
        query=GetVulnerabilities,
    )
    test_edges = make_test_edges(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
    test_pagination_with_before_and_last = make_test_before_last(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        gmp_name,
        selene_name=selene_name,
        plural_selene_name=plural_selene_name,
        gmp_cmd=gmp_cmd,
    )
コード例 #21
0
class OperatingSystemsPaginationTestCase(SeleneTestCase):
    entity_name = 'asset'
    selene_name = 'operatingSystem'
    test_pagination_with_after_and_first = make_test_after_first(
        entity_name,
        selene_name=selene_name,
        asset_type=AssetType.OPERATING_SYSTEM,
    )
    test_counts = make_test_counts(entity_name, selene_name=selene_name)
    test_page_info = make_test_page_info(
        entity_name, selene_name=selene_name, query=GetOperatingSystems
    )
    test_edges = make_test_edges(entity_name, selene_name=selene_name)
    test_pagination_with_before_and_last = make_test_before_last(
        entity_name,
        selene_name=selene_name,
        asset_type=AssetType.OPERATING_SYSTEM,
    )
    test_after_first_before_last = make_test_after_first_before_last(
        entity_name,
        selene_name=selene_name,
        asset_type=AssetType.OPERATING_SYSTEM,
    )