示例#1
0
 def test_loop_two_control_vars(self, iter_type):
     # this should work the same for both iteration types
     tlh = LoggingHandler.create_fresh_handler()
     run_section([{'for $i, $j {0} $foo'.format(iter_type): [{'log_i': '$i, $j'}]}],
                 {'foo': {'bar': 'barval', 'spam': 'spamval'}})
     assert ('INFO', 'bar, barval') in tlh.msgs
     assert ('INFO', 'spam, spamval') in tlh.msgs
 def setup_method(self, method):
     self.ya = yaml_assistant.YamlAssistant('ya', {}, '', None)
     self.ya.role = 'crt'
     self.ya._files = {'first': {'source': 'f/g'}, 'second': {'source': 's/t'}}
     self.ya._dependencies = [{'rpm': ['foo']}]
     self.ya._dependencies_a = [{'rpm': ['bar']}]
     self.ya._pre_run = [{'log_i': 'pre'}]
     self.ya._run = [{'log_i': 'run'}]
     self.ya._post_run = [{'log_i': 'post'}]
     self.tlh = LoggingHandler.create_fresh_handler()
示例#3
0
 def test_loop_two_control_vars(self, iter_type):
     # this should work the same for both iteration types
     tlh = LoggingHandler.create_fresh_handler()
     run_section([{
         'for $i, $j {0} $foo'.format(iter_type): [{
             'log_i': '$i, $j'
         }]
     }], {'foo': {
         'bar': 'barval',
         'spam': 'spamval'
     }})
     assert ('INFO', 'bar, barval') in tlh.msgs
     assert ('INFO', 'spam, spamval') in tlh.msgs
 def setup_method(self, method):
     self.ya = yaml_assistant.YamlAssistant('ya', {}, '', None)
     self.ya.role = 'crt'
     self.ya._files = {
         'first': {
             'source': 'f/g'
         },
         'second': {
             'source': 's/t'
         }
     }
     self.ya._dependencies = [{'rpm': ['foo']}]
     self.ya._dependencies_a = [{'rpm': ['bar']}]
     self.ya._pre_run = [{'log_i': 'pre'}]
     self.ya._run = [{'log_i': 'run'}]
     self.ya._post_run = [{'log_i': 'post'}]
     self.tlh = LoggingHandler.create_fresh_handler()
示例#5
0
 def setup_method(self, method):
     self.old_command_runners = command_runners.command_runners
     command_runners.command_runners = copy.deepcopy(
         self.old_command_runners)
     self.tlh = LoggingHandler.create_fresh_handler()
示例#6
0
 def setup_method(self, method):
     self.tlh = LoggingHandler.create_fresh_handler()
 def setup_method(self, method):
     self.ya = yaml_assistant.YamlAssistant('ya', {}, '', None)
     self.ya.role = 'twk'
     self.ya._files = {}
     self.tlh = LoggingHandler.create_fresh_handler()
     self.dda = {'project_type': ['foo', 'bar', 'baz']}
示例#8
0
 def setup_method(self, method):
     if os.path.exists(self.cf):
         os.unlink(self.cf)
     self.cch = Cache()
     self.tlh = LoggingHandler.create_fresh_handler()
 def setup_method(self, method):
     self.ccr = UseCommandRunner
     self.tlh = LoggingHandler.create_fresh_handler()
 def setup_method(self, method):
     self.tlh = LoggingHandler.create_fresh_handler()
示例#11
0
 def test_version_action(self):
     tlh = LoggingHandler.create_fresh_handler()
     va = actions.VersionAction()
     from devassistant import __version__ as VERSION
     va.run()
     assert VERSION in tlh.msgs[0][1]
示例#12
0
 def setup_method(self, method):
     self.tlh = LoggingHandler()
     self.oldinp = CliDialogHelper.inp
示例#13
0
 def setup_method(self, method):
     self.yl = YamlAssistantLoader
     self.reset_yl_assistants_dirs()
     self.yl._assistants = {}
     self.tlh = LoggingHandler.create_fresh_handler()
示例#14
0
 def setup_method(self, method):
     self.da = actions.DocAction
     self.tlh = LoggingHandler.create_fresh_handler()
示例#15
0
 def setup_method(self, method):
     self.ccr = UseCommandRunner
     self.tlh = LoggingHandler.create_fresh_handler()
 def setup_method(self, method):
     self.yl = YamlAssistantLoader
     self.reset_yl_assistants_dirs()
     self.yl._assistants = {}
     self.tlh = LoggingHandler.create_fresh_handler()
示例#17
0
 def setup_method(self, method):
     self.da = actions.DocAction
     self.tlh = LoggingHandler.create_fresh_handler()
 def setup_method(self, method):
     self.old_command_runners = command_runners.command_runners
     command_runners.command_runners = copy.deepcopy(self.old_command_runners)
     self.tlh = LoggingHandler.create_fresh_handler()
示例#19
0
 def setup_method(self, method):
     self.ya = yaml_assistant.YamlAssistant('ya', {}, '', None)
     self.ya.role = 'twk'
     self.ya._files = {}
     self.tlh = LoggingHandler.create_fresh_handler()
     self.dda = {'project_type': ['foo', 'bar', 'baz']}
示例#20
0
 def setup_method(self, method):
     if os.path.exists(self.cf):
         os.unlink(self.cf)
     self.cch = Cache()
     self.tlh = LoggingHandler.create_fresh_handler()
示例#21
0
 def test_version_action(self):
     tlh = LoggingHandler.create_fresh_handler()
     va = actions.VersionAction()
     from devassistant import __version__ as VERSION
     va.run()
     assert VERSION in tlh.msgs[0][1]