Exemple #1
0
def test_execute_as_reg(manager: ModuleManager):
    manager.execute_regs = CoroutineMock()
    yield from manager.execute('#czarnobyl', User('a!b@c'), 'dummmmmmy')
    manager.execute_regs.assert_called_once_with(
        'dummmmmmy',
        False,
        '#czarnobyl',
        User('a!b@c'),
    )
def test_execute_regs(manager: ModuleManager):
    manager.execute_func = CoroutineMock()
    manager.load_all()
    yield from manager.execute_regs(
        msg='dummmmy a b',
        private=False,
        channel='#czarnobyl',
        user=User('a!b@c'),
    )

    from grazyna.test_mocks.dummy_plugin import dummy_reg
    manager.execute_func.assert_called_once_with(
        dummy_reg,
        manager.plugins['dummy'],
        False,
        '#czarnobyl',
        User('a!b@c'),
        ('a', 'b'),
        {},
    )
Exemple #3
0
def test_execute_regs(manager: ModuleManager):
    manager.execute_func = CoroutineMock()
    manager.load_all()
    yield from manager.execute_regs(
        msg='dummmmy a b',
        private=False,
        channel='#czarnobyl',
        user=User('a!b@c'),
    )

    from grazyna.test_mocks.dummy_plugin import dummy_reg
    manager.execute_func.assert_called_once_with(
        dummy_reg,
        manager.plugins['dummy'],
        False,
        '#czarnobyl',
        User('a!b@c'),
        ('a', 'b'),
        {},
    )
def test_execute_as_reg(manager: ModuleManager):
    manager.execute_regs = CoroutineMock()
    yield from manager.execute('#czarnobyl', User('a!b@c'), 'dummmmmmy')
    manager.execute_regs.assert_called_once_with(
        'dummmmmmy', False, '#czarnobyl', User('a!b@c'),
    )