def test_name_not_allowed_when_not_named(self): self._allow_list_files_restricted() with self.assertRaises(FileNameNotAllowed): check_command_allowed('listFiles', 'bucket-a', None, self.account_info)
def test_bucket_not_allowed(self): self._allow_list_files_restricted() with self.assertRaises(BucketNotAllowed): check_command_allowed('listFiles', 'bucket-b', 'prefix/', self.account_info)
def test_name_allowed_when_restricted(self): self._allow_list_files_unrestricted() check_command_allowed('listFiles', 'bucket-a', 'prefix/', self.account_info)
def test_capability_not_allowed(self): self._allow_list_files_restricted() with self.assertRaises(CapabilityNotAllowed): check_command_allowed('deleteFiles', 'bucket-a', 'prefix/', self.account_info)