コード例 #1
0
ファイル: test_query.py プロジェクト: Yipit/elasticfun
def test_empty_query_with_or():
    # When I filter by an empty query and by another word with the OR
    # operator
    query = Query.empty() | Query('cream')

    # Then I see that the query was created without extra operators
    text_type(query).should.equal('"cream"')
コード例 #2
0
ファイル: test_query.py プロジェクト: Yipit/elasticfun
def test_empty_query():
    # When I query for nothing
    querystr = text_type(Query.empty())

    # Then I see that this query object won't return anything just yet
    querystr.should.be.empty