'This test will make sure that enrollment caps are enforced'

def test_enrollment_cap(self):

    self.setup_user()
    url = reverse('about_course', args=[self.course.id.to_deprecated_string()])
    resp = self.client.get(url)
    self.assertEqual(resp.status_code, 200)
    self.assertIn('<a    href="#"    class="register">', resp.content)
    self.enroll(self.course, verify=True)
    self.email = 'foo_second@test.com'
    self.password = 'bar'
    self.username = 'test_second'
    self.create_account(self.username, self.email, self.password)
    self.activate_user(self.email)
    self.login(self.email, self.password)
    resp = self.client.get(url)
    self.assertEqual(resp.status_code, 200)
    self.assertIn('Course    is    full', resp.content)
    result = self.enroll(self.course)
    self.assertFalse(result)
    self.assertNotIn(REG_STR, resp.content)
