def METHOD_NAME(self):
    recipe = "xcursor-transparent-theme"
    recipe_path = "recipes-graphics/xcursor-transparent-theme"
    recipe_file = self.get_recipe_basename(recipe)
    testoutdir = os.path.join(self.builddir, 'test_bitbakelayers_flatten')
    self.assertFalse(os.path.isdir(testoutdir), msg = "test_bitbakelayers_flatten should not exist at this point in time")
    self.track_for_cleanup(testoutdir)
    result = runCmd('bitbake-layers flatten %s' % testoutdir)
    bb_file = os.path.join(testoutdir, recipe_path, recipe_file)
    self.assertTrue(os.path.isfile(bb_file), msg = "Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.")
    contents = ftools.read_file(bb_file)
    find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents)
    self.assertTrue(find_in_contents, msg = "Flattening layers did not work. bitbake-layers flatten output: %s" % result.output)