'The TestRole operation tests the IAM role used to create the
pipeline.
The `TestRole` action lets you determine whether the IAM role
you are using has sufficient permissions to let Elastic
Transcoder perform tasks associated with the transcoding
process. The action attempts to assume the specified IAM role,
checks read access to the input and output buckets, and tries
to send a test notification to Amazon SNS topics that you
specify.
:type role: string
:param role: The IAM Amazon Resource Name (ARN) for the role that you
want Elastic Transcoder to test.
:type input_bucket: string
:param input_bucket: The Amazon S3 bucket that contains media files to
be transcoded. The action attempts to read from this bucket.
:type output_bucket: string
:param output_bucket: The Amazon S3 bucket that Elastic Transcoder will
write transcoded media files to. The action attempts to read from
this bucket.
:type topics: list
:param topics: The ARNs of one or more Amazon Simple Notification
Service (Amazon SNS) topics that you want the action to send a test
notification to.'

def test_role(self, role=None, input_bucket=None, output_bucket=None, topics=None):

    uri = '/2012-09-25/roleTests'
    params = {}
    if (role is not None):
        params['Role'] = role
    if (input_bucket is not None):
        params['InputBucket'] = input_bucket
    if (output_bucket is not None):
        params['OutputBucket'] = output_bucket
    if (topics is not None):
        params['Topics'] = topics
    return self.make_request('POST', uri, expected_status=200, data=json.dumps(params))
