Exemplo n.º 1
0
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"')
Exemplo n.º 2
0
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