コード例 #1
0
 def test_dao_filter_by_both_arguments_error(self, dao: InMemoryDao):
     with pytest.raises(QueryError):
         assert dao.filter_by(id_=3, ids=[3, 5])
コード例 #2
0
 def test_dao_filter_by_two_times_error(self, dao: InMemoryDao):
     with pytest.raises(QueryError):
         assert dao.filter_by(id_=3).filter_by(id_=5)
コード例 #3
0
 def test_dao_filter_by_success(self, dao: InMemoryDao):
     assert list(dao.filter_by(id_=3)) == [{'char': 'c', 'is_a': False}]
コード例 #4
0
ファイル: test_dao.py プロジェクト: lhaze/dharma
 def test_dao_filter_by_two_times_error(self, dao: InMemoryDao):
     with pytest.raises(QueryError):
         assert dao.filter_by(id_=3).filter_by(id_=5)
コード例 #5
0
ファイル: test_dao.py プロジェクト: lhaze/dharma
 def test_dao_filter_by_both_arguments_error(self, dao: InMemoryDao):
     with pytest.raises(QueryError):
         assert dao.filter_by(id_=3, ids=[3, 5])
コード例 #6
0
ファイル: test_dao.py プロジェクト: lhaze/dharma
 def test_dao_filter_by_success(self, dao: InMemoryDao):
     assert list(dao.filter_by(id_=3)) == [{'char': 'c', 'is_a': False}]
コード例 #7
0
 def test_dao_filter_by_success(self, dao: InMemoryDao):
     assert list(dao.filter_by(id_=3)) == [{"char": "c", "is_a": False}]