def test_plain(self): username, password = '******', 'bar' mech = sasl.PLAIN(username, password) response = mech.start(None) assert isinstance(response, bytes) assert response.split(b'\0') == \ [b'', username.encode('utf-8'), password.encode('utf-8')]
def test_plain_no_password(self): username, password = '******', None mech = sasl.PLAIN(username, password) response = mech.start(None) assert response == NotImplemented