Exemplo n.º 1
0
    def test_page(self):
        self.config.testing_securitypolicy(userid='Tobias', permissive=True)
        request = construct_dummy_request()
        response = index(request)
        verify_dictionary_of_view(response)

        self.assertIn('review', response)
        self.assertIn('privilege_list', response)
        self.assertIn('reputation_list', response)
        self.assertIn('reputation', response)
        self.assertTrue(response['reputation']['has_all_rights'])
        self.assertEqual(15, response['reputation']['count'])
Exemplo n.º 2
0
 def test_page_not_logged_in(self):
     request = construct_dummy_request()
     response = index(request)
     self.assertEqual(response.status_code, 400)
Exemplo n.º 3
0
 def test_page_not_logged_in(self):
     request = testing.DummyRequest()
     response = index(request)
     self.assertEqual(response.status_code, 400)