'This makes sure that the invitation only restirction takes prescendence over
any purchase enablements'

def test_invitation_only(self):

    course = CourseFactory.create(metadata={'invitation_only': True})
    self._set_ecomm(course)
    self.setup_user()
    url = reverse('about_course', args=[course.id.to_deprecated_string()])
    resp = self.client.get(url)
    self.assertEqual(resp.status_code, 200)
    self.assertIn('Enrollment    in    this    course    is    by    invitation    only', resp.content)
