# Path: grazyna/auths.py
# class QuakenetAuth(AbstractAuth):
#     user = None
#     passwd = None
# 
#     def __init__(self, user, passwd):
#         self.user = user
#         self.passwd = passwd
# 
#     def auth(self, protocol):
#         msg = 'AUTH {0.user} {0.passwd}'.format(self)
#         protocol.say('Q@CServe.quakenet.org', msg)
# 
# Path: grazyna/test_mocks/sender.py
# class SayMessage(Message):
# 
#     def __init__(self, to, msg):
#         super().__init__('PRIVMSG', to, ':' + msg)


from grazyna.auths import QuakenetAuth
from grazyna.test_mocks.sender import SayMessage


def test_quakenet_auth(protocol):
    auth = QuakenetAuth('socek', 'klocek')
    auth.auth(protocol)
    assert protocol.messages == [

# Path: grazyna/auths.py
# class QuakenetAuth(AbstractAuth):
#     user = None
#     passwd = None
# 
#     def __init__(self, user, passwd):
#         self.user = user
#         self.passwd = passwd
# 
#     def auth(self, protocol):
#         msg = 'AUTH {0.user} {0.passwd}'.format(self)
#         protocol.say('Q@CServe.quakenet.org', msg)
# 
# Path: grazyna/test_mocks/sender.py
# class SayMessage(Message):
# 
#     def __init__(self, to, msg):
#         super().__init__('PRIVMSG', to, ':' + msg)


# Path: grazyna/tests/auths/test_quakenet_auth.py
from grazyna.auths import QuakenetAuth
from grazyna.test_mocks.sender import SayMessage



def test_quakenet_auth(protocol):
    auth = QuakenetAuth('socek', 'klocek')
    auth.auth(protocol)
    assert protocol.messages == [

        SayMessage('Q@CServe.quakenet.org', 'AUTH socek klocek'),