Ejemplo n.º 1
0
def test_find_one_matching_and_clause(sut: SqlalchemyRepository, widgets):
    assert sut.find_one_matching((Attr('name').contains('foo*'))
                                 & (Attr('priority') > 1)) is widgets['foobar']
Ejemplo n.º 2
0
def test_find_one_matching_is_none(sut: SqlalchemyRepository, widgets):
    assert sut.find_one_matching(Attr('priority').is_none()) is widgets['baz']
Ejemplo n.º 3
0
def test_find_one_matching_is_true(sut: SqlalchemyRepository, widgets):
    assert sut.find_one_matching(Attr('deleted').is_true()) is widgets['baz']
Ejemplo n.º 4
0
def test_find_one_matching_equality(sut: SqlalchemyRepository, widgets):
    assert sut.find_one_matching(Attr('name') == 'foo') is widgets['foo']