title: Deactivate a portal user in a test class
body: <p>Does anybody know how to deactivate a portal user in a <b>test class</b>? </p>
  
  <p>I'm trying to delete Accounts with an assoicated Portal User and figured if I deactivated the portal user I may be able to delete the Account.</p>
  
  <p>I've tried updating the User with</p>
  
  <pre><code>IsPortalEnabled = false
  IsActive = false
  </code></pre>
  
  <p>however this doesn't seem to work. When checking the user after the update, IsPortalEnabled = <b>true</b> and IsActive = false. (Is Salesforce seems to be doing something by the scenes?)</p>