def METHOD_NAME(request, api):
    '''
    fixture to create a scan
    '''
    METHOD_NAME = api.scans.create(
        name='pytest: {}'.format(uuid.uuid4()),
        template='basic',
        targets=['127.0.0.1'])
    def teardown():
        '''
        function to clear the scan
        '''
        try:
            api.scans.delete(METHOD_NAME['id'])
        except NotFoundError as notfound:
            log_exception(notfound)
    request.addfinalizer(teardown)
    return METHOD_NAME