def test_choose_with_qb(self): with patch.object(self.qb_client, 'query') as query: Department.choose(['name1', 'name2'], field="Name", qb=self.qb_client) self.assertTrue(query.called)
def test_choose(self, where): Department.choose(['name1', 'name2'], field="Name") where.assert_called_once_with("Name in ('name1', 'name2')", qb=None)