Ejemplo n.º 1
0
def test_source_tab_urls_is_in_str_gives_correct_json_representation():
    items = [
        "test_sourceTabUrls_1", "test_sourceTabUrls_2", "test_sourceTabUrls_3"
    ]
    _filter = SourceTabUrls.is_in(items)
    expected = IS_IN.format("sourceTabUrls", *sorted(items))
    assert str(_filter) == expected
Ejemplo n.º 2
0
def test_source_category_is_in_str_gives_correct_json_representation():
    items = [
        "test_sourceCategory_1", "test_sourceCategory_2",
        "test_sourceCategory_3"
    ]
    _filter = SourceCategory.is_in(items)
    expected = IS_IN.format("sourceCategory", *sorted(items))
    assert str(_filter) == expected
Ejemplo n.º 3
0
def test_sync_destination_name_is_in_str_gives_correct_json_representation():
    items = [
        SyncDestination.GOOGLE_DRIVE, SyncDestination.BOX,
        SyncDestination.ICLOUD
    ]
    _filter = SyncDestination.is_in(items)
    expected = IS_IN.format("syncDestination", *sorted(items))
    assert str(_filter) == expected
Ejemplo n.º 4
0
def test_destination_name_is_in_str_gives_correct_json_representation():
    items = [
        "Dropbox",
        "Reddit",
        "Windows 10",
    ]
    _filter = DestinationName.is_in(items)
    expected = IS_IN.format("destinationName", *items)
    assert str(_filter) == expected
Ejemplo n.º 5
0
def test_risk_indicator_is_in_str_gives_correct_json_representation():
    items = [
        RiskIndicator.FileCategories.EXECUTABLE,
        RiskIndicator.FileCategories.IMAGE,
        RiskIndicator.FileCategories.PDF,
    ]
    _filter = RiskIndicator.is_in(items)
    expected = IS_IN.format("riskIndicatorNames", *items)
    assert str(_filter) == expected
Ejemplo n.º 6
0
def test_destination_category_is_in_str_gives_correct_json_representation():
    items = [
        DestinationCategory.CLOUD_STORAGE,
        DestinationCategory.MESSAGING,
        DestinationCategory.UNCATEGORIZED,
    ]
    _filter = DestinationCategory.is_in(items)
    expected = IS_IN.format("destinationCategory", *items)
    assert str(_filter) == expected
Ejemplo n.º 7
0
def test_exposure_type_is_in_str_gives_correct_json_representation():
    items = [
        ExposureType.CLOUD_STORAGE,
        ExposureType.OUTSIDE_TRUSTED_DOMAINS,
        ExposureType.SHARED_TO_DOMAIN,
    ]
    _filter = ExposureType.is_in(items)
    expected = IS_IN.format("exposure", *items)
    assert str(_filter) == expected
Ejemplo n.º 8
0
def test_sync_destination_username_is_in_str_gives_correct_json_representation(
):
    items = ["*@example2.com", "*****@*****.**", "*****@*****.**"]
    _filter = SyncDestinationUsername.is_in(items)
    expected = IS_IN.format("syncDestinationUsername", *items)
    assert str(_filter) == expected
Ejemplo n.º 9
0
def test_severity_is_in_str_gives_correct_json_representation():
    items = ["HIGH", "MEDIUM", "LOW"]
    _filter = Severity.is_in(items)
    expected = IS_IN.format("severity", *items)
    assert str(_filter) == expected
Ejemplo n.º 10
0
def test_removable_media_serial_number_is_in_str_gives_correct_json_representation(
):
    items = ["name1", "name2", "name3"]
    _filter = RemovableMediaSerialNumber.is_in(items)
    expected = IS_IN.format("removableMediaSerialNumber", *items)
    assert str(_filter) == expected
Ejemplo n.º 11
0
def test_actor_is_in_str_gives_correct_json_representation():
    items = ["test.testerson", "flag.flagerson", "mock.mockerson"]
    _filter = Actor.is_in(items)
    expected = IS_IN.format("actor", *items)
    assert str(_filter) == expected
Ejemplo n.º 12
0
def test_description_is_in_str_gives_correct_json_representation():
    items = ["desc1", "desc2", "desc3"]
    _filter = Description.is_in(items)
    expected = IS_IN.format("description", *items)
    assert str(_filter) == expected
Ejemplo n.º 13
0
def test_process_name_is_in_str_gives_correct_json_representation():
    items = ["n1", "n2", "n3"]
    _filter = ProcessName.is_in(items)
    expected = IS_IN.format("processName", *items)
    assert str(_filter) == expected
Ejemplo n.º 14
0
def test_public_ip_address_is_in_str_gives_correct_json_representation():
    items = ["publicIpAddress1", "publicIpAddress2", "publicIpAddress3"]
    _filter = PublicIPAddress.is_in(items)
    expected = IS_IN.format("publicIpAddress", *items)
    assert str(_filter) == expected
Ejemplo n.º 15
0
def test_device_username_is_in_str_gives_correct_json_representation():
    items = ["deviceUserName1", "deviceUserName2", "deviceUserName3"]
    _filter = DeviceUsername.is_in(items)
    expected = IS_IN.format("deviceUserName", *items)
    assert str(_filter) == expected
Ejemplo n.º 16
0
def test_private_ip_address_is_in_str_gives_correct_json_representation():
    items = ["privateIp1", "privateIp2", "privateIp3"]
    _filter = PrivateIPAddress.is_in(items)
    expected = IS_IN.format("privateIpAddresses", *items)
    assert str(_filter) == expected
Ejemplo n.º 17
0
def test_source_name_is_in_str_gives_correct_json_representation():
    items = ["test_sourceName_1", "test_sourceName_2", "test_sourceName_3"]
    _filter = SourceName.is_in(items)
    expected = IS_IN.format("sourceName", *sorted(items))
    assert str(_filter) == expected
Ejemplo n.º 18
0
def test_rule_name_is_in_str_gives_correct_json_representation():
    items = ["rule 1", "rule 2", "rule 3"]
    _filter = RuleName.is_in(items)
    expected = IS_IN.format("name", *items)
    assert str(_filter) == expected
Ejemplo n.º 19
0
def test_tab_url_is_in_str_gives_correct_json_representation():
    items = ["tab1", "tab2", "tab3"]
    _filter = TabURL.is_in(items)
    expected = IS_IN.format("tabUrls", *items)
    assert str(_filter) == expected
Ejemplo n.º 20
0
def test_email_from_is_in_str_gives_correct_json_representation():
    items = ["email_from1", "email_from2", "email_from3"]
    _filter = EmailFrom.is_in(items)
    expected = IS_IN.format("emailFrom", *items)
    assert str(_filter) == expected
Ejemplo n.º 21
0
def test_window_title_is_in_str_gives_correct_json_representation():
    items = ["window1", "window2", "window3"]
    _filter = WindowTitle.is_in(items)
    expected = IS_IN.format("tabTitles", *items)
    assert str(_filter) == expected
Ejemplo n.º 22
0
def test_email_sender_is_in_str_gives_correct_json_representation():
    items = ["email_sender1", "email_sender2", "email_sender3"]
    _filter = EmailSender.is_in(items)
    expected = IS_IN.format("emailSender", *items)
    assert str(_filter) == expected
Ejemplo n.º 23
0
def test_os_hostname_is_in_str_gives_correct_json_representation():
    items = ["osHostName1", "osHostName2", "osHostName3"]
    _filter = OSHostname.is_in(items)
    expected = IS_IN.format("osHostName", *items)
    assert str(_filter) == expected
Ejemplo n.º 24
0
def test_alert_state_is_in_str_gives_correct_json_representation():
    items = ["OPEN", "DISMISSED", "OTHER"]
    _filter = AlertState.is_in(items)
    expected = IS_IN.format("state", *items)
    assert str(_filter) == expected
Ejemplo n.º 25
0
def test_email_policy_name_is_in_str_gives_correct_json_representation():
    items = ["test_policy1", "test_policy2", "test_policy3"]
    _filter = EmailPolicyName.is_in(items)
    expected = IS_IN.format("emailDlpPolicyNames", *items)
    assert str(_filter) == expected
Ejemplo n.º 26
0
def test_process_owner_is_in_str_gives_correct_json_representation():
    items = ["owner1", "owner2", "owner3"]
    _filter = ProcessOwner.is_in(items)
    expected = IS_IN.format("processOwner", *items)
    assert str(_filter) == expected
Ejemplo n.º 27
0
def test_email_recipients_is_in_str_gives_correct_json_representation():
    items = ["EmailRecipients1", "EmailRecipients2", "EmailRecipients3"]
    _filter = EmailRecipients.is_in(items)
    expected = IS_IN.format("emailRecipients", *items)
    assert str(_filter) == expected
Ejemplo n.º 28
0
def test_removable_media_volume_name_is_in_str_gives_correct_json_representation(
):
    items = ["name1", "name2", "name3"]
    _filter = RemovableMediaVolumeName.is_in(items)
    expected = IS_IN.format("removableMediaVolumeName", *items)
    assert str(_filter) == expected
Ejemplo n.º 29
0
def test_email_subject_is_in_str_gives_correct_json_representation():
    items = ["test_subject1", "test_subject2", "test_subject3"]
    _filter = EmailSubject.is_in(items)
    expected = IS_IN.format("emailSubject", *items)
    assert str(_filter) == expected
Ejemplo n.º 30
0
def test_removable_media_partition_id_is_in_str_gives_correct_json_representation(
):
    items = ["name1", "name2", "name3"]
    _filter = RemovableMediaPartitionID.is_in(items)
    expected = IS_IN.format("removableMediaPartitionId", *items)
    assert str(_filter) == expected