def test_dao_filter_by_both_arguments_error(self, dao: TinyDbDao): with pytest.raises(QueryError) as error_info: assert dao.filter_by(id_=3, ids=[3, 5]) assert error_info.value == QueryErrors.CONFLICTING_QUERY_ARGUMENTS
def test_dao_filter_by_two_times_error(self, dao: TinyDbDao): with pytest.raises(QueryError) as error_info: assert dao.filter_by(id_=3).filter_by(id_=5) assert error_info.value == QueryErrors.CONFLICTING_QUERY_ARGUMENTS
def test_dao_filter_by_two_times_error(self, dao: TinyDbDao): with pytest.raises(QueryError) as error_info: assert dao.filter_by(id_=3).filter_by(id_=5) assert error_info.value == QueryErrors.CONFLICTING_QUERY_ARGUMENTS
def test_dao_filter_by_success(self, dao: TinyDbDao): assert list(dao.filter_by(id_=3)) == [{'char': 'c', 'is_a': False}]
def test_dao_filter_by_both_arguments_error(self, dao: TinyDbDao): with pytest.raises(QueryError) as error_info: assert dao.filter_by(id_=3, ids=[3, 5]) assert error_info.value == QueryErrors.CONFLICTING_QUERY_ARGUMENTS
def test_dao_filter_by_success(self, dao: TinyDbDao): assert list(dao.filter_by(id_=3)) == [{'char': 'c', 'is_a': False}]
def test_dao_filter_by_success(self, dao: TinyDbDao): assert list(dao.filter_by(id_=3)) == [{"char": "c", "is_a": False}]
def test_dao_filter_by_two_times_error(self, dao: TinyDbDao): with pytest.raises(InvalidQueryError): assert dao.filter_by(id_=3).filter_by(id_=5)
def test_dao_filter_by_both_arguments_error(self, dao: TinyDbDao): with pytest.raises(InvalidQueryError): assert dao.filter_by(id_=3, ids=[3, 5])