mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +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.password.setValue('')
|
||||
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
||||
self.assertEqual(self.irc.sasl_next_mechanisms,
|
||||
['scram-sha-256', 'plain'])
|
||||
self.irc.sasl_next_mechanisms = ['scram-sha-256', 'plain']
|
||||
|
||||
self.startCapNegociation()
|
||||
|
||||
@ -1398,17 +1397,10 @@ class SaslTestCase(SupyTestCase, CapNegMixin):
|
||||
conf.supybot.networks.test.sasl.password.setValue('')
|
||||
conf.supybot.networks.test.certfile.setValue('')
|
||||
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
||||
self.assertEqual(self.irc.sasl_next_mechanisms,
|
||||
['scram-sha-256', 'external', 'plain'])
|
||||
self.irc.sasl_next_mechanisms = ['external', 'plain']
|
||||
|
||||
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()
|
||||
self.assertEqual(m, ircmsgs.IrcMsg(command='AUTHENTICATE',
|
||||
args=('EXTERNAL',)))
|
||||
@ -1441,8 +1433,7 @@ class SaslTestCase(SupyTestCase, CapNegMixin):
|
||||
conf.supybot.networks.test.sasl.password.setValue('')
|
||||
conf.supybot.networks.test.certfile.setValue('')
|
||||
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
||||
self.assertEqual(self.irc.sasl_next_mechanisms,
|
||||
['scram-sha-256', 'external', 'plain'])
|
||||
self.irc.sasl_next_mechanisms = ['external', 'plain']
|
||||
|
||||
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.password.setValue('')
|
||||
self.assertEqual(self.irc.sasl_current_mechanism, None)
|
||||
self.assertEqual(self.irc.sasl_next_mechanisms,
|
||||
['scram-sha-256', 'plain'])
|
||||
self.irc.sasl_next_mechanisms = ['plain']
|
||||
|
||||
self.startCapNegociation(caps='')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user