'Verify that a 404 is returned for a non-existent profile page.'

def test_undefined_profile_page(self):

    profile_path = reverse('learner_profile', kwargs={'username': 'no_such_user'})
    response = self.client.get(path=profile_path)
    self.assertEqual(404, response.status_code)
