def METHOD_NAME(self):
    self.login_as(self.user)
    url = reverse('view_lib_file', args=[
        self.repo.id, '/some_random_file'])
    resp = self.client.get(url)
    self.assertEqual(200, resp.status_code)
    self.assertTemplateUsed(resp, 'error.html')