Esempio n. 1
0
def test_fields_datetime_on(mock_datetime_field):
    assert (select(mock_datetime_field("test_dt").on(
        "2019-12-24 02:03:04")).sysparms == "test_dtON2019-12-24 02:03:04")
Esempio n. 2
0
def test_fields_datetime_until(mock_datetime_field):
    assert (select(
        mock_datetime_field("test_dt").until("2019-12-24 02:03:04")).sysparms
            == "test_dt<=2019-12-24 02:03:04")
Esempio n. 3
0
def test_fields_datetime_before(mock_datetime_field):
    assert (select(
        mock_datetime_field("test_dt").before("2019-12-24 02:03:04")).sysparms
            == "test_dt<2019-12-24 02:03:04")
Esempio n. 4
0
def test_fields_datetime_between(mock_datetime_field):
    assert (select(
        mock_datetime_field("test_dt").between("2018-12-24 02:03:04",
                                               "2019-12-24 02:03:04")).sysparms
            == "test_dtBETWEEN2018-12-24 02:03:04@2019-12-24 02:03:04")
Esempio n. 5
0
def test_fields_string_query_not_equals(mock_stringmap_field):
    assert (select(
        mock_stringmap_field("test_str").not_equals(
            "Network storage is unavailable")).sysparms ==
            "test_str!=Network storage is unavailable")
Esempio n. 6
0
def test_fields_datetime_as_of(mock_datetime_field):
    assert (select(
        mock_datetime_field("test_dt").as_of("2019-12-24 02:03:04")).sysparms
            == "test_dt>=2019-12-24 02:03:04")
Esempio n. 7
0
def test_fields_string_query_less_or_equals(mock_stringmap_field):
    assert (select(mock_stringmap_field("test_str").less_or_equals(
        "s")).sysparms == "test_str<=s")
Esempio n. 8
0
def test_fields_string_query_not_contains(mock_stringmap_field):
    assert (select(mock_stringmap_field("test_str").not_contains(
        "SAP")).sysparms == "test_str!*SAP")
Esempio n. 9
0
def test_fields_string_query_greater_or_equals(mock_stringmap_field):
    assert (select(mock_stringmap_field("test_str").greater_or_equals(
        "s")).sysparms == "test_str>=s")
Esempio n. 10
0
def test_fields_string_query_equals(mock_stringmap_field):
    assert (select(
        mock_stringmap_field("test_str") == "test").sysparms == "test_str=test"
            )
    assert (select(mock_stringmap_field("test_str").equals("test")).sysparms ==
            "test_str=test")
Esempio n. 11
0
def test_fields_string_query_ends_with(mock_stringmap_field):
    assert (select(mock_stringmap_field("test_str").ends_with(
        "outage")).sysparms == "test_strENDSWITHoutage")
Esempio n. 12
0
def test_fields_string_query_between(mock_stringmap_field):
    assert (select(mock_stringmap_field("test_str").between(
        "q", "t")).sysparms == "test_strBETWEENq@t")
Esempio n. 13
0
def test_fields_boolean_select_true(mock_boolean_field):
    assert (select(
        mock_boolean_field("test_bool").is_true()).sysparms == "test_bool=true"
            )