def test_credentialsSetResponse(self):
        """
        L{PLAINCredentials.setResponse} parses challenge strings of the
        form::

            NUL<authn-id>NUL<secret>
        """
        cred = imap4.PLAINCredentials()
        cred.setResponse(b'\0testuser\0secret')
        self.assertEqual(cred.username, b'testuser')
        self.assertEqual(cred.password, b'secret')

        L{PLAINCredentials.setResponse} parses challenge strings of the
        form::

            NUL<authn-id>NUL<secret>
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py