mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-26 20:14:20 +01:00
Fix tests when pyxmpp2_scram is not installed.
This commit is contained in:
parent
c008d1191c
commit
747ef77106
@ -1361,8 +1361,7 @@ class SaslTestCase(SupyTestCase, CapNegMixin):
|
|||||||
conf.supybot.networks.test.sasl.username.setValue('')
|
conf.supybot.networks.test.sasl.username.setValue('')
|
||||||
conf.supybot.networks.test.sasl.password.setValue('')
|
conf.supybot.networks.test.sasl.password.setValue('')
|
||||||
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
||||||
self.assertEqual(self.irc.sasl_next_mechanisms,
|
self.irc.sasl_next_mechanisms = ['scram-sha-256', 'plain']
|
||||||
['scram-sha-256', 'plain'])
|
|
||||||
|
|
||||||
self.startCapNegociation()
|
self.startCapNegociation()
|
||||||
|
|
||||||
@ -1398,17 +1397,10 @@ class SaslTestCase(SupyTestCase, CapNegMixin):
|
|||||||
conf.supybot.networks.test.sasl.password.setValue('')
|
conf.supybot.networks.test.sasl.password.setValue('')
|
||||||
conf.supybot.networks.test.certfile.setValue('')
|
conf.supybot.networks.test.certfile.setValue('')
|
||||||
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
||||||
self.assertEqual(self.irc.sasl_next_mechanisms,
|
self.irc.sasl_next_mechanisms = ['external', 'plain']
|
||||||
['scram-sha-256', 'external', 'plain'])
|
|
||||||
|
|
||||||
self.startCapNegociation()
|
self.startCapNegociation()
|
||||||
|
|
||||||
m = self.irc.takeMsg()
|
|
||||||
self.assertEqual(m, ircmsgs.IrcMsg(command='AUTHENTICATE',
|
|
||||||
args=('SCRAM-SHA-256',)))
|
|
||||||
self.irc.feedMsg(ircmsgs.IrcMsg(command='904',
|
|
||||||
args=('mechanism not available',)))
|
|
||||||
|
|
||||||
m = self.irc.takeMsg()
|
m = self.irc.takeMsg()
|
||||||
self.assertEqual(m, ircmsgs.IrcMsg(command='AUTHENTICATE',
|
self.assertEqual(m, ircmsgs.IrcMsg(command='AUTHENTICATE',
|
||||||
args=('EXTERNAL',)))
|
args=('EXTERNAL',)))
|
||||||
@ -1441,8 +1433,7 @@ class SaslTestCase(SupyTestCase, CapNegMixin):
|
|||||||
conf.supybot.networks.test.sasl.password.setValue('')
|
conf.supybot.networks.test.sasl.password.setValue('')
|
||||||
conf.supybot.networks.test.certfile.setValue('')
|
conf.supybot.networks.test.certfile.setValue('')
|
||||||
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
||||||
self.assertEqual(self.irc.sasl_next_mechanisms,
|
self.irc.sasl_next_mechanisms = ['external', 'plain']
|
||||||
['scram-sha-256', 'external', 'plain'])
|
|
||||||
|
|
||||||
self.startCapNegociation(caps='sasl=foo,plain,bar')
|
self.startCapNegociation(caps='sasl=foo,plain,bar')
|
||||||
|
|
||||||
@ -1470,8 +1461,7 @@ class SaslTestCase(SupyTestCase, CapNegMixin):
|
|||||||
conf.supybot.networks.test.sasl.username.setValue('')
|
conf.supybot.networks.test.sasl.username.setValue('')
|
||||||
conf.supybot.networks.test.sasl.password.setValue('')
|
conf.supybot.networks.test.sasl.password.setValue('')
|
||||||
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
||||||
self.assertEqual(self.irc.sasl_next_mechanisms,
|
self.irc.sasl_next_mechanisms = ['plain']
|
||||||
['scram-sha-256', 'plain'])
|
|
||||||
|
|
||||||
self.startCapNegociation(caps='')
|
self.startCapNegociation(caps='')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user