def test_validate_permissions(self):
    bodies = [{'permissions': 'aaa'}, {'permissions': {'read': 'aaa'}}, {'permissions': {'read': [111]}}]
    for body in bodies:
        self.request._json = body
        self.assertRaises(ValidationError, unmarshal_request, self.request, self.resources['Buckets'].create_bucket)
def test_validate_permissions(self):
    bodies = [{'permissions': 'aaa'}, {'permissions': {'read': 'aaa'}}, {'permissions': {'read': [111]}}]
    for body in bodies:
        self.request._json = body
        self.assertRaises(ValidationError, unmarshal_request, self.request, self.resources['Buckets'].create_bucket)