class AwesomeScaffolder(scaffolder_interface.Scaffolder): """Awesome test scaffolder.""" NAME = 'Awesome' DESCRIPTION = 'This is a really awesome thing.' QUESTIONS = [ scaffolder_interface.StringQuestion('test1', 'a'), scaffolder_interface.StringQuestion('test2', 'a'), scaffolder_interface.StringQuestion('test3', 'a') ] def __init__(self): super(AwesomeScaffolder, self).__init__() self.test1 = '' self.test2 = '' self.test3 = '' def GetJinjaContext(self): """Returns a dict that can be used as a context for Jinja2 templates.""" context = super(AwesomeScaffolder, self).GetJinjaContext() context['test1'] = self.test1 context['test2'] = self.test2 context['test3'] = self.test3 return context def GenerateFiles(self): """Empty file generator.""" return iter(()) def GetFilesToCopy(self): """Empty files to copy generator.""" return iter(())
class AverageTestScaffolder(BaseScaffolderTest): """Second test scaffolder.""" NAME = 'Average' DESCRIPTION = 'This scaffolder implements the average parser.' QUESTIONS = [ interface.StringQuestion('mediocre', 'a'), interface.StringQuestion('lala', 'a'), interface.StringQuestion('ok', 'enter')]
class AwesomeTestScaffolder(BaseScaffolderTest): """First test scaffolder.""" NAME = 'Awesome' DESCRIPTION = 'This is a really awesome thing.' QUESTIONS = [ interface.StringQuestion('test1', 'enter the test'), interface.StringQuestion('test2', 'enter the test'), interface.StringQuestion('test3', 'enter the test')]
class RegistrationTestScaffolder(BaseScaffolderTest): """Third test scaffolder.""" NAME = 'Registration' DESCRIPTION = ( 'This scaffolder implements the registration scaffolder, required ' 'paperwork for many ISO standards of the future.') QUESTIONS = [ interface.StringQuestion('27001', 'a'), interface.StringQuestion('9001', 'a'), interface.StringQuestion('3120512', 'a'), interface.ListQuestion('9001-2', 'enter the list here'), interface.StringQuestion('12362323', 'a')]
class AwesomeScaffolder(scaffolder_interface.Scaffolder): """Awesome test scaffolder.""" NAME = 'Awesome' DESCRIPTION = 'This is a really awesome thing.' QUESTIONS = [ scaffolder_interface.StringQuestion('test1', 'a'), scaffolder_interface.StringQuestion('test2', 'a'), scaffolder_interface.StringQuestion('test3', 'a') ] def __init__(self): super(AwesomeScaffolder, self).__init__() self.test1 = '' self.test2 = '' self.test3 = '' def GetInitFileChanges(self): """Generate a list of init files that need changing and the changes to them. Yields: tuple(str, str): path to the init file and the entry to add to it. """ return iter(()) def GetJinjaContext(self): """Returns a dict that can be used as a context for Jinja2 templates.""" context = super(AwesomeScaffolder, self).GetJinjaContext() context['test1'] = self.test1 context['test2'] = self.test2 context['test3'] = self.test3 return context def GenerateFiles(self): """Empty file generator.""" return iter(()) def GetFilesToCopy(self): """Empty files to copy generator.""" return iter(())