def test_publish_by_ids(self, mocker): mocker.return_value = MOCK_RESPONSE api.publish_by_ids(["pub1", "pub2"]) self.assertTrue( get_uri(mocker.call_args[0]).endswith( '/resources/image/publish_resources')) self.assertIn('pub1', get_list_param(mocker, 'public_ids')) self.assertIn('pub2', get_list_param(mocker, 'public_ids'))
def test_publish_by_ids(self, mocker): mocker.return_value = MOCK_RESPONSE api.publish_by_ids(["pub1", "pub2"]) self.assertTrue(get_uri(mocker.call_args[0]).endswith('/resources/image/publish_resources')) self.assertIn('pub1', get_list_param(mocker, 'public_ids')) self.assertIn('pub2', get_list_param(mocker, 'public_ids'))