

def test_user_can_not_see_cloud_he_has_no_access_to_within_customer(self):
    for (user_role, cloud) in (('admin', 'manager'), ('manager', 'admin')):
        self.client.force_authenticate(user=self.users[user_role])
        unseen_cloud = self.clouds[cloud]
        response = cloud_urls.client.get(self._get_customer_url(self.customer))
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        cloud_urls = set([cloud['url'] for cloud in response.data['clouds']])
        self.assertNotIn(self._get_cloud_url(unseen_cloud), cloud_urls, 'User should not see cloud')

dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/iaas/tests/test_customer_addendum.py CustomerAddendumApiPermissionTest.test_user_can_not_see_cloud_he_has_no_access_to_within_customer/VarMisuse@60/94 `self`->`cloud_urls`