def test_where_with_qb(self): with patch.object(self.qb_client, 'query') as query: Department.where("Active=True", start_position=1, max_results=10, qb=self.qb_client) self.assertTrue(query.called)
def test_where(self, query): Department.where("Active=True", start_position=1, max_results=10) query.assert_called_once_with( "SELECT * FROM Department WHERE Active=True STARTPOSITION 1 MAXRESULTS 10", qb=None)
def test_where_with_qb(self): with patch.object(self.qb_client, 'query') as query: Department.where("Active=True", 1, 10, qb=self.qb_client) self.assertTrue(query.called)