old_contents: from funfactory.urlresolvers import reverse
  from pyquery import PyQuery as pq
  
  from phonebook.tests import LDAPTestCase, MOZILLIAN, PENDING
  from phonebook.tests_views import _mozillian_client
  
  
  class TestThingsForPeople(LDAPTestCase):
      """Verify that the wrong users don't see things."""
  
      def test_searchbox(self):
          url = reverse('home')
          r = self.client.get(url)
          doc = pq(r.content)
          assert not doc('input[type=search]')
          r = self.pending_client.get(url)
          doc = pq(r.content)
          assert not doc('input[type=search]')
          r = self.mozillian_client.get(url)
          doc = pq(r.content)
          assert doc('input[type=search]')
  
      def test_invitelink(self):
          url = reverse('home')
          r = self.client.get(url)
          doc = pq(r.content)
          assert not doc('a#invite')
          r = self.pending_client.get(url)
          doc = pq(r.content)
          assert not doc('a#invite'), "Unvouched can't invite."
          r = self.mozillian_client.get(url)
          doc = pq(r.content)
          assert doc('a#invite')
  
      def test_register_redirects_for_authenticated_users(self):
          """Ensure only anonymous users can register an account."""
          r = self.client.get(reverse('register'))
          self.assertTrue(200 == r.status_code,
                          'Anonymous users can access the registration page')
  
          r = _mozillian_client(MOZILLIAN['email']).get(reverse('register'))
          self.assertTrue(302 == r.status_code,
                          'Authenticated users are redirected from registration.')
  
      def test_vouchlink(self):
          """No vouch link when PENDING looks at PENDING."""
          url = reverse('profile', args=[PENDING['uniq_id']])
          r = self.mozillian_client.get(url)
          doc = pq(r.content)
          assert doc('#vouch-form button')
          r = self.pending_client.get(url)
          doc = pq(r.content)
          errmsg = 'Self vouching... silliness.'
          assert not doc('#vouch-form button'), errmsg
          assert 'Vouch for me' not in r.content, errmsg
  
new_contents: from funfactory.urlresolvers import reverse
  from pyquery import PyQuery as pq
  
  from phonebook.tests import LDAPTestCase, MOZILLIAN, PENDING
  from phonebook.tests.test_views import _mozillian_client
  
  
  class TestThingsForPeople(LDAPTestCase):
      """Verify that the wrong users don't see things."""
  
      def test_searchbox(self):
          url = reverse('home')
          r = self.client.get(url)
          doc = pq(r.content)
          assert not doc('input[type=search]')
          r = self.pending_client.get(url)
          doc = pq(r.content)
          assert not doc('input[type=search]')
          r = self.mozillian_client.get(url)
          doc = pq(r.content)
          assert doc('input[type=search]')
  
      def test_invitelink(self):
          url = reverse('home')
          r = self.client.get(url)
          doc = pq(r.content)
          assert not doc('a#invite')
          r = self.pending_client.get(url)
          doc = pq(r.content)
          assert not doc('a#invite'), "Unvouched can't invite."
          r = self.mozillian_client.get(url)
          doc = pq(r.content)
          assert doc('a#invite')
  
      def test_register_redirects_for_authenticated_users(self):
          """Ensure only anonymous users can register an account."""
          r = self.client.get(reverse('register'))
          self.assertTrue(200 == r.status_code,
                          'Anonymous users can access the registration page')
  
          r = _mozillian_client(MOZILLIAN['email']).get(reverse('register'))
          self.assertTrue(302 == r.status_code,
                          'Authenticated users are redirected from registration.')
  
      def test_vouchlink(self):
          """No vouch link when PENDING looks at PENDING."""
          url = reverse('profile', args=[PENDING['uniq_id']])
          r = self.mozillian_client.get(url)
          doc = pq(r.content)
          assert doc('#vouch-form button')
          r = self.pending_client.get(url)
          doc = pq(r.content)
          errmsg = 'Self vouching... silliness.'
          assert not doc('#vouch-form button'), errmsg
          assert 'Vouch for me' not in r.content, errmsg
  
subject: Fix test module typo