'Test that when student try to visit un-enrolled students\' discussion profile,
the system raises Http404.'

def test_404_non_enrolled_user(self, __):

    unenrolled_user = UserFactory.create()
    request = RequestFactory().get('dummy_url')
    request.user = self.student
    with self.assertRaises(Http404):
        views.user_profile(request, self.course.id.to_deprecated_string(), unenrolled_user.id)
