Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 def test_name_allowed_when_restricted(self):
     self._allow_list_files_unrestricted()
     check_command_allowed('listFiles', 'bucket-a', 'prefix/',
                           self.account_info)
Exemple #4
0
 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)