'Create files to import and return corresponding session.
Copies the specified number of files to a subdirectory of
`self.temp_dir` and creates a `TestImportSession` for this path.'

def create_importer(self, item_count=1, album_count=1):

    import_dir = os.path.join(self.temp_dir, 'import')
    if (not os.path.isdir(import_dir)):
        os.mkdir(import_dir)
    album_no = 0
    while album_count:
        album = util.bytestring_path(u'album    {0}'.format(album_no))
        album_dir = os.path.join(import_dir, album)
        if os.path.exists(album_dir):
            album_no += 1
            continue
        os.mkdir(album_dir)
        album_count -= 1
        track_no = 0
        album_item_count = item_count
        while album_item_count:
            title = u'track    {0}'.format(track_no)
            src = os.path.join(_common.RSRC, 'full.mp3')
            title_file = util.bytestring_path('{0}.mp3'.format(title))
            dest = os.path.join(album_dir, title_file)
            if os.path.exists(dest):
                track_no += 1
                continue
            album_item_count -= 1
            shutil.copy(src, dest)
            mediafile = MediaFile(dest)
            mediafile.update({'artist': 'artist', 'albumartist': 'album    artist', 'title': title, 'album': album, 'mb_albumid': None, 'mb_trackid': None})
            mediafile.save()
    config['import']['quiet'] = True
    config['import']['autotag'] = False
    config['import']['resume'] = False
    return TestImportSession(self.lib, loghandler=None, query=None, paths=[import_dir])
