'Get url for the specified xblock handler'

def _get_handler_url(self, handler, xblock_name=None):

    xblock_type = None
    for scenario in self.test_configuration:
        for block in scenario['xblocks']:
            if (block['urlname'] == xblock_name):
                xblock_type = block['blocktype']
    key = unicode(self.course.id.make_usage_key(xblock_type, xblock_name))
    return reverse('xblock_handler', kwargs={'course_id': unicode(self.course.id), 'usage_id': key, 'handler': handler, 'suffix': ''})
