def test_order_by_with_qb(self): with patch.object(self.qb_client, 'query') as query: Customer.filter(Active=True, order_by='DisplayName', qb=self.qb_client) self.assertTrue(query.called)
def test_order_by(self, query): Customer.filter(Active=True, order_by='DisplayName') query.assert_called_once_with( "SELECT * FROM Customer WHERE Active = True ORDERBY DisplayName", qb=None)