Exemple #1
0
 def test_user_view(self):
     from shootout.views import user_view
     self.config.testing_securitypolicy('username')
     _registerRoutes(self.config)
     _registerCommonTemplates(self.config)
     request = testing.DummyRequest()
     request.matchdict = {'username': '******'}
     user = self._addUser()
     result = user_view(request)
     self.assertEqual(result['user'].username, 'username')
     self.assertEqual(result['user'].user_id, 1)
Exemple #2
0
 def test_user_view(self):
     from shootout.views import user_view
     self.config.testing_securitypolicy(u'username')
     self.config.include('shootout.addroutes')
     self.config.include(register_templates)
     request = testing.DummyRequest()
     request.matchdict = {'username': u'username'}
     self._addUser()
     result = user_view(request)
     self.assertEqual(result['user'].username, u'username')
     self.assertEqual(result['user'].user_id, 1)
Exemple #3
0
 def test_user_view(self):
     from shootout.views import user_view
     self.config.testing_securitypolicy('username')
     _registerRoutes(self.config)
     _registerCommonTemplates(self.config)
     request = testing.DummyRequest()
     request.matchdict = {'username': '******'}
     user = self._addUser()
     result = user_view(request)
     self.assertEqual(result['user'].username, 'username')
     self.assertEqual(result['user'].user_id, 1)
Exemple #4
0
 def test_user_view(self):
     from shootout.views import user_view
     self.config.testing_securitypolicy(u'username')
     self.config.include('shootout.addroutes')
     self.config.include(register_templates)
     request = testing.DummyRequest()
     request.matchdict = {'username': u'username'}
     self._addUser()
     result = user_view(request)
     self.assertEqual(result['user'].username, u'username')
     self.assertEqual(result['user'].user_id, 1)
Exemple #5
0
    def test_user_view(self):
        from shootout.views import user_view

        self.config.testing_securitypolicy(u"username")
        self.config.include("shootout.addroutes")
        self.config.include(register_templates)
        request = testing.DummyRequest()
        request.matchdict = {"username": u"username"}
        self._addUser()
        result = user_view(request)
        self.assertEqual(result["user"].username, u"username")
        self.assertEqual(result["user"].user_id, 1)