title: Python Unittest: Assert information sought for negative test case
body: <p>my case is a bit more complicated. I have several tests that check for certain login procedures on routers and switches.</p>
  
  <p>Setup:</p>
  
  <pre><code>import testcore (package that used Paramiko)
  from testcore.control.ssh import SSH
  import unittest
  from test import support
  import logging
  import os
  </code></pre>
  
  <p>Here can you see one of my testcases:</p>
  
  <pre><code>def test_create_user_ENFORCE_2(self):
  
      if self.s.login():
  
          q=self.s.query('account')
          self.assertIsNotNone(q, 'missing answer')
          #self.assertEqual('\r\n', q, 'unexpected result')
  
  
          # switch to prompt account
  
          q=self.s.query('add 15 testuser_ENFORCE_P1 ')
          self.assertIsNotNone(q, 'missing answer')
          #self.assertEqual('\r\n', q, 'unexpected result')
          self.assertTrue('class str')
          #self.assertTrue('The Password does not comply' != '\r\n\rERROR! The Password does not comply[240 chars]ar\n')
          #self.assertIs : True('The Password does not comply', q, 'add 15 testuser_ENFORCE_P1')
          print(type(q))
          q=self.s.query('logout')
          self.s.close()
  </code></pre>
  
  <p>The test works as it should. He starts a login on the respective router / switch and executes a command on the prompt.</p>
  
  <p>The problem is this:</p>
  
  <ul>
  <li>The test should check if I u.a. Special characters can use as a password. If so, the test is failed. The positive test would be that I can not create an account that contains special characters.</li>
  </ul>
  
  <p>The only help after the current issue, I receive the following message on the router / switch</p>
  
  <blockquote>
    <p>'The Password does not comply' != '\r\n\rERROR! The Password does not
    comply[240 chars]ar\n'</p>
  </blockquote>
  
  <p>How and with which assert can I do the most?</p>