'Helper function for testing content files.'

def create_random_content_file(self):

    content = get_random_content(kinds=['Video'], limit=1)[0]
    youtube_id = content['id']
    path = content['path']
    fake_content_file = os.path.join(settings.CONTENT_ROOT, ('%s.mp4' % youtube_id))
    with open(fake_content_file, 'w') as fh:
        fh.write('')
    update_item(update={'files_complete': 1, 'available': True, 'size_on_disk': 12}, path=content['path'])
    self.assertTrue(os.path.exists(fake_content_file), ("Make    sure    the    content    file    was    created,    youtube_id='%s'." % youtube_id))
    return (fake_content_file, content['id'], youtube_id, path)
