Esempio n. 1
0
    def test_facebook_500(self):
        request = self.factory.get('/')
        self.in_facebook_app.return_value = True

        with patch('affiliates.base.views.render') as render:
            eq_(views.handler500(request), render.return_value)

            self.in_facebook_app.assert_called_with(request)
            render.assert_called_with(request, 'facebook/error.html', status=500)
Esempio n. 2
0
    def test_facebook_500(self):
        request = self.factory.get('/')
        self.in_facebook_app.return_value = True

        with patch('affiliates.base.views.render') as render:
            eq_(views.handler500(request), render.return_value)

            self.in_facebook_app.assert_called_with(request)
            render.assert_called_with(request, 'facebook/error.html', status=500)
Esempio n. 3
0
    def test_500(self):
        request = self.factory.get('/')
        self.in_facebook_app.return_value = False

        with patch('affiliates.base.views.server_error') as server_error:
            eq_(views.handler500(request), server_error.return_value)

            self.in_facebook_app.assert_called_with(request)
            server_error.assert_called_with(request)
Esempio n. 4
0
    def test_500(self):
        request = self.factory.get('/')
        self.in_facebook_app.return_value = False

        with patch('affiliates.base.views.server_error') as server_error:
            eq_(views.handler500(request), server_error.return_value)

            self.in_facebook_app.assert_called_with(request)
            server_error.assert_called_with(request)