# Path: dftimewolf/lib/resources.py
# class Recipe(object):
#   def __init__(self,
#                description: str,
#                contents: Dict[str, Any],
#                args: List[Tuple[str, str, Any]]) -> None:
#   def GetHelpString(self) -> str:
# 
# 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 io
import unittest
from dftimewolf.lib import resources
from dftimewolf.lib.recipes import manager
        "name": "TestModule",
        "args": {
            "test": "@test"
        }
    }],
    "args": [
      ["test", "Test argument", null]
    ]
}
"""

  def setUp(self):
    manager.RecipesManager.ALLOW_RECIPE_OVERRIDE = False

  def testReadRecipeFromFileObject(self):
    """Tests the _ReadRecipeFromFileObject function."""
    test_manager = manager.RecipesManager()

    recipe = test_manager._ReadRecipeFromFileObject(io.StringIO(self._JSON))

    self.assertIsNotNone(recipe)
    self.assertEqual(recipe.name, 'test')
    self.assertEqual(recipe.description, 'test recipe')
    self.assertEqual(recipe.contents['modules'][0]['name'], 'TestModule')
    self.assertEqual(len(recipe.args), 1)

  # TODO: add tests for ReadRecipesFromDirectory.

  def testRecipeRegistration(self):
    """Tests the RegisterRecipe and DeregisterRecipe functions."""

# Path: dftimewolf/lib/resources.py
# class Recipe(object):
#   def __init__(self,
#                description: str,
#                contents: Dict[str, Any],
#                args: List[Tuple[str, str, Any]]) -> None:
#   def GetHelpString(self) -> str:
# 
# 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/lib/recipes/manager.py
import io
import unittest
from dftimewolf.lib import resources
from dftimewolf.lib.recipes import manager

        "name": "TestModule",
        "args": {
            "test": "@test"
        }
    }],
    "args": [
      ["test", "Test argument", null]
    ]
}
"""

  def setUp(self):
    manager.RecipesManager.ALLOW_RECIPE_OVERRIDE = False

  def testReadRecipeFromFileObject(self):
    """Tests the _ReadRecipeFromFileObject function."""
    test_manager = manager.RecipesManager()

    recipe = test_manager._ReadRecipeFromFileObject(io.StringIO(self._JSON))

    self.assertIsNotNone(recipe)
    self.assertEqual(recipe.name, 'test')
    self.assertEqual(recipe.description, 'test recipe')
    self.assertEqual(recipe.contents['modules'][0]['name'], 'TestModule')
    self.assertEqual(len(recipe.args), 1)

  # TODO: add tests for ReadRecipesFromDirectory.

  def testRecipeRegistration(self):
    """Tests the RegisterRecipe and DeregisterRecipe functions."""

    test_manager = manager.RecipesManager()