Exemplo n.º 1
0
 def test_get_corrected_commands_with_rule_returns_list(self):
     rule = Rule(get_new_command=lambda x: [x.script + '!', x.script + '@'],
                 priority=100)
     assert (list(rule.get_corrected_commands(Command(script='test'))) == [
         CorrectedCommand(script='test!', priority=100),
         CorrectedCommand(script='test@', priority=200)
     ])
Exemplo n.º 2
0
 def test_get_corrected_commands_with_rule_returns_list(self):
     rule = Rule(get_new_command=lambda x: [x.script + "!", x.script + "@"],
                 priority=100)
     assert list(rule.get_corrected_commands(Command("test", ""))) == [
         CorrectedCommand(script="test!", priority=100),
         CorrectedCommand(script="test@", priority=200),
     ]
Exemplo n.º 3
0
 def test_get_corrected_commands_with_rule_returns_command(self):
     rule = Rule(get_new_command=lambda x: x.script + '!',
                 priority=100)
     assert (list(rule.get_corrected_commands(Command(script='test')))
             == [CorrectedCommand(script='test!', priority=100)])
Exemplo n.º 4
0
 def test_get_corrected_commands_with_rule_returns_command(self):
     rule = Rule(get_new_command=lambda x: x.script + '!', priority=100)
     assert list(rule.get_corrected_commands(Command(script='test'))) \
            == [CorrectedCommand(script='test!', priority=100)]
Exemplo n.º 5
0
 def test_get_corrected_commands_with_rule_returns_list(self):
     rule = Rule(get_new_command=lambda x: [x.script + '!', x.script + '@'],
                 priority=100)
     assert list(rule.get_corrected_commands(Command(script='test'))) \
            == [CorrectedCommand(script='test!', priority=100),
                CorrectedCommand(script='test@', priority=200)]
Exemplo n.º 6
0
 def test_get_corrected_commands_with_rule_returns_list(self):
     rule = Rule(get_new_command=lambda x: [x.script + "!", x.script + "@"], priority=100)
     assert list(rule.get_corrected_commands(Command(script="test"))) == [
         CorrectedCommand(script="test!", priority=100),
         CorrectedCommand(script="test@", priority=200),
     ]