# Path: dftimewolf/lib/recipes/manager.py
# class RecipesManager(object):
#   ALLOW_RECIPE_OVERRIDE = False
#   def _ReadRecipeFromFileObject(
#       self, file_object: Union[StringIO, TextIOWrapper]) -> Recipe:
#   def DeregisterRecipe(self, recipe: Recipe) -> None:
#   def GetRecipes(self) -> List[Recipe]:
#   def ReadRecipeFromFile(self, path: str) -> None:
#   def ReadRecipesFromDirectory(self, path: str) -> None:
#   def RegisterRecipe(self, recipe: Recipe) -> None:
#   def RegisterRecipes(self, recipes: List[Recipe]) -> None:
#   def Recipes(self) -> Dict[str, resources.Recipe]:


import os
import unittest
from dftimewolf.lib.recipes import manager as recipes_manager
      self.assertIsNotNone(recipe.name)
      self.assertIsNotNone(recipe.description)
      self.assertIn('modules', recipe.contents)
      self.assertIsInstance(recipe.contents['modules'], list)

      self.assertIsInstance(recipe.args, list)

  def testRecipeModulesHaveFields(self):
    """Tests that modules defined in the recipe have the correct fields."""
    for recipe in self._recipes_manager.GetRecipes():
      for module in recipe.contents['modules']:
        error_msg = 'module {0:s} in recipe {1:s}'.format(
            module['name'], recipe.contents['name'])

        self.assertIn('wants', module, msg=error_msg)
        self.assertIn('name', module, msg=error_msg)
        self.assertIn('args', module, msg=error_msg)

        self.assertIsInstance(module['wants'], list, msg=error_msg)
        self.assertIsInstance(module['args'], dict, msg=error_msg)
        self.assertIsInstance(module['name'], str, msg=error_msg)

  def testRecipeModulesAllPresent(self):
    """Tests that a recipe's modules depend only on modules present in the
    recipe."""
    for recipe in self._recipes_manager.GetRecipes():
      declared_modules = set()
      wanted_modules = set()
      for module in recipe.contents['modules']:
        module_name = module['name']

# Path: dftimewolf/lib/recipes/manager.py
# class RecipesManager(object):
#   ALLOW_RECIPE_OVERRIDE = False
#   def _ReadRecipeFromFileObject(
#       self, file_object: Union[StringIO, TextIOWrapper]) -> Recipe:
#   def DeregisterRecipe(self, recipe: Recipe) -> None:
#   def GetRecipes(self) -> List[Recipe]:
#   def ReadRecipeFromFile(self, path: str) -> None:
#   def ReadRecipesFromDirectory(self, path: str) -> None:
#   def RegisterRecipe(self, recipe: Recipe) -> None:
#   def RegisterRecipes(self, recipes: List[Recipe]) -> None:
#   def Recipes(self) -> Dict[str, resources.Recipe]:


# Path: tests/cli/recipes.py
import os
import unittest
from dftimewolf.lib.recipes import manager as recipes_manager

      self.assertIsNotNone(recipe.name)
      self.assertIsNotNone(recipe.description)
      self.assertIn('modules', recipe.contents)
      self.assertIsInstance(recipe.contents['modules'], list)

      self.assertIsInstance(recipe.args, list)

  def testRecipeModulesHaveFields(self):
    """Tests that modules defined in the recipe have the correct fields."""
    for recipe in self._recipes_manager.GetRecipes():
      for module in recipe.contents['modules']:
        error_msg = 'module {0:s} in recipe {1:s}'.format(
            module['name'], recipe.contents['name'])

        self.assertIn('wants', module, msg=error_msg)
        self.assertIn('name', module, msg=error_msg)
        self.assertIn('args', module, msg=error_msg)

        self.assertIsInstance(module['wants'], list, msg=error_msg)
        self.assertIsInstance(module['args'], dict, msg=error_msg)
        self.assertIsInstance(module['name'], str, msg=error_msg)

  def testRecipeModulesAllPresent(self):
    """Tests that a recipe's modules depend only on modules present in the
    recipe."""
    for recipe in self._recipes_manager.GetRecipes():
      declared_modules = set()
      wanted_modules = set()
      for module in recipe.contents['modules']:
        module_name = module['name']

        runtime_name = module.get('runtime_name', module_name)