# Path: grazyna/plugins/creeper.py
# @register(reg=r'^[Ss]{4,}(?:!+|.+)$')
# def creeper(bot):
#     bot.kick(why='Alert!')
# 
# Path: grazyna/test_mocks/sender.py
# class Message(list):
# 
#     def __init__(self, *args):
#         arg, *args = args
#         super().__init__([arg.upper()] + args)


from grazyna.plugins.creeper import creeper
from grazyna.test_mocks.sender import Message
import pytest
import re



@pytest.mark.asyncio
def test_creeper(public_bot):
    yield from creeper(public_bot)
    assert public_bot.protocol.messages == [
        Message('KICK', '#czarnobyl', 'socek', ':Alert!'),
    ]


def test_creeper_regexp():

# Path: grazyna/plugins/creeper.py
# @register(reg=r'^[Ss]{4,}(?:!+|.+)$')
# def creeper(bot):
#     bot.kick(why='Alert!')
# 
# Path: grazyna/test_mocks/sender.py
# class Message(list):
# 
#     def __init__(self, *args):
#         arg, *args = args
#         super().__init__([arg.upper()] + args)


# Path: grazyna/tests/plugins/test_creeper.py
from grazyna.plugins.creeper import creeper
from grazyna.test_mocks.sender import Message
import pytest
import re




@pytest.mark.asyncio
def test_creeper(public_bot):
    yield from creeper(public_bot)
    assert public_bot.protocol.messages == [
        Message('KICK', '#czarnobyl', 'socek', ':Alert!'),
    ]


def test_creeper_regexp():

    assert re.match(creeper.reg, 'ssss!')