Ejemplo n.º 1
0
    def test_profile_passes_authority_parameter(self, session_profile, pyramid_request):
        pyramid_request.params = {'authority': 'foo.com'}

        result = api_profile.profile(pyramid_request)

        session_profile.assert_called_once_with(pyramid_request, 'foo.com')
        assert result == session_profile.return_value
Ejemplo n.º 2
0
    def test_profile_passes_authority_parameter(self, session_profile, pyramid_request):
        pyramid_request.params = {'authority': 'foo.com'}

        result = api_profile.profile(pyramid_request)

        session_profile.assert_called_once_with(pyramid_request, 'foo.com')
        assert result == session_profile.return_value
Ejemplo n.º 3
0
def test_profile_view_proxies_to_session(session_profile, pyramid_request):
    session_profile.return_value = {'foo': 'bar'}
    result = api_profile.profile(pyramid_request)
    assert result == {'foo': 'bar'}
Ejemplo n.º 4
0
    def test_profile_view_proxies_to_session(self, session_profile,
                                             pyramid_request):
        result = api_profile.profile(pyramid_request)

        session_profile.assert_called_once_with(pyramid_request, None)
        assert result == session_profile.return_value
Ejemplo n.º 5
0
    def test_profile_view_proxies_to_session(self, session_profile, pyramid_request):
        result = api_profile.profile(pyramid_request)

        session_profile.assert_called_once_with(pyramid_request, None)
        assert result == session_profile.return_value