def test_head(self): ''' Test for return the metadata for a bucket, or an object in a bucket. ''' with patch.object(s3, '_get_key', return_value=('key', 'keyid', 'service_url', 'verify_ssl', 'location')): with patch.object(salt.utils.s3, 'query', return_value='A'): self.assertEqual(s3.head('bucket'), 'A')