Example #1
0
    def test_creation_from_new(self):
        action = Action.new('shuffle', lambda cls, item:
            random.shuffle(item)
        )

        self.assertEqual(action.__name__, 'Shuffle')
        self.assertEqual(action.NAME, 'shuffle')
        self.assertIn('shuffle', Action.plugins())
Example #2
0
def actions():
    Echo = Action.new('Echo', lambda x: x)

    assert Echo.NAME == 'echo'
    return Action.plugins()
Example #3
0
def actions():
    Echo = Action.new('Echo', lambda x: x)

    assert Echo.NAME == 'echo'
    return Action.plugins()