def setUp(self): super(TestSiteList, self).setUp() self.yola.list_sites.return_value = {'results': [ {'id': '1'}, {'id': '2'}, ]} self.sites = Site.list(user_id='user123') _, self.service_kwargs = self.yola.list_sites.call_args
def setUp(self): super(TestSiteList, self).setUp() self.yola.list_sites.return_value = { 'results': [ { 'id': '1' }, { 'id': '2' }, ] } self.sites = Site.list(user_id='user123') _, self.service_kwargs = self.yola.list_sites.call_args
def test_list_sites_using_model(self): sites = Site.list() site_ids = [s.id for s in sites] self.assertIn(self.site['id'], site_ids)