コード例 #1
0
ファイル: test_query.py プロジェクト: puhrez/pyinfluxql
def test_format_where_gt():
    """greater than expressions should be formatted correctly
    in a where clause
    """
    q = Query()
    assert q._format_where_expression(['col'], 'gt', 1.0) == "col > 1.0"
    assert q._format_where_expression(['col'], 'gt', 50) == "col > 50"
コード例 #2
0
ファイル: test_query.py プロジェクト: puhrez/pyinfluxql
def test_format_where_ne():
    """not equals expressions should be formatted correctly
    in a where clause
    """
    q = Query()
    assert q._format_where_expression(['col'], 'ne', False) == "col != false"
    assert q._format_where_expression(['col'], 'ne', True) == "col != true"
コード例 #3
0
ファイル: test_query.py プロジェクト: puhrez/pyinfluxql
def test_format_where_lt():
    """less than expressions should be formatted correctly
    in a where clause
    """
    q = Query()
    assert q._format_where_expression(['col'], 'lt', 1.0) == "col < 1.0"
    assert q._format_where_expression(['col'], 'lt', 50) == "col < 50"
コード例 #4
0
ファイル: test_query.py プロジェクト: jjmalina/pyinfluxql
def test_format_where_gt():
    """greater than expressions should be formatted correctly
    in a where clause
    """
    q = Query()
    assert q._format_where_expression(['col'], 'gt', 1.0) == "col > 1.0"
    assert q._format_where_expression(['col'], 'gt', 50) == "col > 50"
コード例 #5
0
ファイル: test_query.py プロジェクト: jjmalina/pyinfluxql
def test_format_where_lt():
    """less than expressions should be formatted correctly
    in a where clause
    """
    q = Query()
    assert q._format_where_expression(['col'], 'lt', 1.0) == "col < 1.0"
    assert q._format_where_expression(['col'], 'lt', 50) == "col < 50"
コード例 #6
0
ファイル: test_query.py プロジェクト: jjmalina/pyinfluxql
def test_format_where_ne():
    """not equals expressions should be formatted correctly
    in a where clause
    """
    q = Query()
    assert q._format_where_expression(['col'], 'ne', False) == "col != false"
    assert q._format_where_expression(['col'], 'ne', True) == "col != true"
コード例 #7
0
ファイル: test_query.py プロジェクト: puhrez/pyinfluxql
def test_format_where_eq():
    """equals expressions should be formatted correctly in a where clause
    """
    q = Query()
    assert q._format_where_expression(['col'], 'eq', 'hi') == "col = 'hi'"
コード例 #8
0
ファイル: test_query.py プロジェクト: jjmalina/pyinfluxql
def test_format_where_eq():
    """equals expressions should be formatted correctly in a where clause
    """
    q = Query()
    assert q._format_where_expression(['col'], 'eq', 'hi') == "col = 'hi'"