def test_phonebook_view_list(self): """Test Function to check phonebook list""" response = self.client.get('/phonebook/') self.assertTemplateUsed(response, 'dialer_contact/phonebook/list.html') request = self.factory.get('/phonebook/') request.user = self.user request.session = {} response = phonebook_list(request) self.assertEqual(response.status_code, 200)