Ejemplo n.º 1
0
def test_device_username_eq_unicode_str_gives_correct_json_representation():
    unicode_username = u"您已经发现了秘密信息"
    _filter = DeviceUsername.eq(unicode_username)
    expected = IS.format(
        u"deviceUserName",
        u"\u60a8\u5df2\u7ecf\u53d1\u73b0\u4e86\u79d8\u5bc6\u4fe1\u606f")
    assert str(_filter) == expected
Ejemplo n.º 2
0
def test_alert_state_eq_str_gives_correct_json_representation():
    _filter = AlertState.eq("OPEN")
    expected = IS.format("state", "OPEN")
    assert str(_filter) == expected
Ejemplo n.º 3
0
def test_description_eq_str_gives_correct_json_representation():
    _filter = Description.eq("Departing Employee")
    expected = IS.format("description", "Departing Employee")
    assert str(_filter) == expected
Ejemplo n.º 4
0
def test_rule_name_eq_str_gives_correct_json_representation():
    _filter = RuleName.eq("Departing Employee")
    expected = IS.format("name", "Departing Employee")
    assert str(_filter) == expected
Ejemplo n.º 5
0
def test_severity_eq_str_gives_correct_json_representation():
    _filter = Severity.eq("HIGH")
    expected = IS.format("severity", "HIGH")
    assert str(_filter) == expected
Ejemplo n.º 6
0
def test_actor_eq_str_gives_correct_json_representation():
    _filter = Actor.eq("test.testerson")
    expected = IS.format("actor", "test.testerson")
    assert str(_filter) == expected
Ejemplo n.º 7
0
def test_event_type_eq_str_gives_correct_json_representation():
    _filter = EventType.eq("test_eventType")
    expected = IS.format("eventType", "test_eventType")
    assert str(_filter) == expected