# Path: l2tscaffolder/scaffolders/interface.py
# class BaseQuestion:
# class DictQuestion(BaseQuestion):
# class IntQuestion(BaseQuestion):
# class ListQuestion(BaseQuestion):
# class StringQuestion(BaseQuestion):
# class Scaffolder:
#   TYPE = None
#   TYPE = dict
#   TYPE = int
#   TYPE = list
#   TYPE = str
#   NAME = 'base_parser'
#   DESCRIPTION = ''
#   PROJECT = definitions.DEFINITION_PLASO
#   QUESTIONS = []
#   def __init__(self, attribute: str, prompt: str):
#   def _ValidateType(self, answer: object):
#   def ValidateAnswer(self, answer: object):
#   def __init__(self, attribute, prompt, key_prompt, value_prompt):
#   def __init__(self):
#   def GetInitFileChanges(self) -> Iterator[Tuple[str, str]]:
#   def GetJinjaContext(self) -> Dict[str, object]:
#   def GetQuestions(self) -> List[BaseQuestion]:
#   def GenerateFiles(self) -> Iterator[Tuple[str, str]]:
#   def GetFilesToCopy(self) -> Iterator[Tuple[str, str]]:
#   def RaiseIfNotReady(self):
#   def SetOutputName(self, output_name: str):
#   def SetAttribute(self, name: str, value: object, value_type: type):
# 
# Path: l2tscaffolder/scaffolders/manager.py
# class ScaffolderManager:
#   def DeregisterScaffolder(cls, scaffolder_class: Type[interface.Scaffolder]):
#   def GetScaffolderClasses(cls) -> Iterator[Type[interface.Scaffolder]]:
#   def GetScaffolderNames(cls) -> Iterator[str]:
#   def GetScaffolderInformation(cls) -> Iterator[Tuple[str, str]]:
#   def GetScaffolderObjectByName(
#       cls, scaffolder_name) -> Optional[interface.Scaffolder]:
#   def GetScaffolderObjects(cls) -> Dict[str, interface.Scaffolder]:
#   def GetScaffolderQuestions(cls) -> List[interface.BaseQuestion]:
#   def GetScaffolderQuestionByName(
#       cls, scaffolder_name: str) -> List[interface.BaseQuestion]:
#   def GetScaffolders(cls) -> Iterator[Tuple[str, Type[interface.Scaffolder]]]:
#   def RegisterScaffolder(cls, scaffolder_class: Type[interface.Scaffolder]):
#   def RegisterScaffolders(
#       cls, scaffolder_classes: List[Type[interface.Scaffolder]]):


import unittest
from l2tscaffolder.scaffolders import interface
from l2tscaffolder.scaffolders import manager

    self.assertEqual(question_count, len(questions))

    question_attributes = [x.attribute for x in questions]

    self.assertIn('test1', question_attributes)
    self.assertIn('lala', question_attributes)
    self.assertIn('27001', question_attributes)

  def testGetScaffolderQuestionByName(self):
    """Test fetching questions of a scaffolder scaffolder by NAME attribute."""
    questions = manager.ScaffolderManager.GetScaffolderQuestionByName(
        'registration')

    self.assertEqual(len(questions), 5)

    question_attributes = [question.attribute for question in questions]
    self.assertIn('27001', question_attributes)

  def testGetScaffolders(self):
    """Test getting scaffolders from the manager."""
    scaffolders = dict(list(manager.ScaffolderManager.GetScaffolders()))

    self.assertEqual(len(scaffolders.keys()), 3)
    correct = ['awesome', 'average', 'registration']
    self.assertEqual(set(scaffolders.keys()), set(correct))

  def testRegisterScaffolder(self):
    """Test registering new scaffolders."""
    with self.assertRaises(KeyError):

# Path: l2tscaffolder/scaffolders/interface.py
# class BaseQuestion:
# class DictQuestion(BaseQuestion):
# class IntQuestion(BaseQuestion):
# class ListQuestion(BaseQuestion):
# class StringQuestion(BaseQuestion):
# class Scaffolder:
#   TYPE = None
#   TYPE = dict
#   TYPE = int
#   TYPE = list
#   TYPE = str
#   NAME = 'base_parser'
#   DESCRIPTION = ''
#   PROJECT = definitions.DEFINITION_PLASO
#   QUESTIONS = []
#   def __init__(self, attribute: str, prompt: str):
#   def _ValidateType(self, answer: object):
#   def ValidateAnswer(self, answer: object):
#   def __init__(self, attribute, prompt, key_prompt, value_prompt):
#   def __init__(self):
#   def GetInitFileChanges(self) -> Iterator[Tuple[str, str]]:
#   def GetJinjaContext(self) -> Dict[str, object]:
#   def GetQuestions(self) -> List[BaseQuestion]:
#   def GenerateFiles(self) -> Iterator[Tuple[str, str]]:
#   def GetFilesToCopy(self) -> Iterator[Tuple[str, str]]:
#   def RaiseIfNotReady(self):
#   def SetOutputName(self, output_name: str):
#   def SetAttribute(self, name: str, value: object, value_type: type):
# 
# Path: l2tscaffolder/scaffolders/manager.py
# class ScaffolderManager:
#   def DeregisterScaffolder(cls, scaffolder_class: Type[interface.Scaffolder]):
#   def GetScaffolderClasses(cls) -> Iterator[Type[interface.Scaffolder]]:
#   def GetScaffolderNames(cls) -> Iterator[str]:
#   def GetScaffolderInformation(cls) -> Iterator[Tuple[str, str]]:
#   def GetScaffolderObjectByName(
#       cls, scaffolder_name) -> Optional[interface.Scaffolder]:
#   def GetScaffolderObjects(cls) -> Dict[str, interface.Scaffolder]:
#   def GetScaffolderQuestions(cls) -> List[interface.BaseQuestion]:
#   def GetScaffolderQuestionByName(
#       cls, scaffolder_name: str) -> List[interface.BaseQuestion]:
#   def GetScaffolders(cls) -> Iterator[Tuple[str, Type[interface.Scaffolder]]]:
#   def RegisterScaffolder(cls, scaffolder_class: Type[interface.Scaffolder]):
#   def RegisterScaffolders(
#       cls, scaffolder_classes: List[Type[interface.Scaffolder]]):


# Path: tests/scaffolders/manager.py
import unittest
from l2tscaffolder.scaffolders import interface
from l2tscaffolder.scaffolders import manager


    self.assertEqual(question_count, len(questions))

    question_attributes = [x.attribute for x in questions]

    self.assertIn('test1', question_attributes)
    self.assertIn('lala', question_attributes)
    self.assertIn('27001', question_attributes)

  def testGetScaffolderQuestionByName(self):
    """Test fetching questions of a scaffolder scaffolder by NAME attribute."""
    questions = manager.ScaffolderManager.GetScaffolderQuestionByName(
        'registration')

    self.assertEqual(len(questions), 5)

    question_attributes = [question.attribute for question in questions]
    self.assertIn('27001', question_attributes)

  def testGetScaffolders(self):
    """Test getting scaffolders from the manager."""
    scaffolders = dict(list(manager.ScaffolderManager.GetScaffolders()))

    self.assertEqual(len(scaffolders.keys()), 3)
    correct = ['awesome', 'average', 'registration']
    self.assertEqual(set(scaffolders.keys()), set(correct))

  def testRegisterScaffolder(self):
    """Test registering new scaffolders."""
    with self.assertRaises(KeyError):

      manager.ScaffolderManager.RegisterScaffolder(AverageTestScaffolder)