def METHOD_NAME(self):
    configfile = resource_filename('desitarget.mock', 'data/select-mock-targets.yaml')
    import yaml
    with open(configfile) as fx:
        params = yaml.safe_load(fx)
    for targettype in params['targets'].keys():
        mockfile = params['targets'][targettype]['mockfile'].format(**os.environ)
        self.assertTrue(os.path.exists(mockfile), 'Missing {}'.format(mockfile))
    #- Test without spectra
    targets_truth(params, healpixels=[99737,], nside=256, output_dir=self.outdir, no_spectra=True)
    for obscon in ['bright', 'dark']:
        targetfile = self.outdir + '/997/99737/' + obscon + '/targets-{}-256-99737.fits'.format(obscon)
        truthfile = self.outdir + '/997/99737/' + obscon + '/truth-{}-256-99737.fits'.format(obscon)
        self.assertTrue(os.path.exists(targetfile))
        self.assertTrue(os.path.exists(truthfile))
        with fitsio.FITS(truthfile) as fx:
            self.assertTrue('TRUTH' in fx)
            #- WAVE is there, and FLUX is there but with strange shape (n,0)
            self.assertTrue('WAVE' not in fx)
            self.assertTrue('FLUX' not in fx)
    #- Test with spectra
    shutil.rmtree(self.outdir+'/997')
    targets_truth(params, healpixels=[99737,], nside=256, output_dir=self.outdir, no_spectra=False)
    for obscon in ['bright', 'dark']:
        targetfile = self.outdir + '/997/99737/' + obscon + '/targets-{}-256-99737.fits'.format(obscon)
        truthfile = self.outdir + '/997/99737/' + obscon + '/truth-{}-256-99737.fits'.format(obscon)
        self.assertTrue(os.path.exists(targetfile))
        self.assertTrue(os.path.exists(truthfile))
        with fitsio.FITS(truthfile) as fx:
            self.assertTrue('TRUTH' in fx)
            self.assertTrue('WAVE' in fx)
            self.assertTrue('FLUX' in fx)