Exemple #1
0
    def test_it_returns_a_redirect(self, pyramid_request):
        result = activity.delete_lozenge(pyramid_request)

        assert isinstance(result, httpexceptions.HTTPSeeOther)

        # This tests that the location redirect to is correct and also that
        # the delete_lozenge param has been removed (and is not part of the
        # URL).
        assert result.location == 'http://example.com/search'
Exemple #2
0
    def test_it_returns_a_redirect(self, pyramid_request):
        result = activity.delete_lozenge(pyramid_request)

        assert isinstance(result, httpexceptions.HTTPSeeOther)

        # This tests that the location redirect to is correct and also that
        # the delete_lozenge param has been removed (and is not part of the
        # URL).
        assert result.location == 'http://example.com/search'
Exemple #3
0
    def test_it_preserves_the_query_param(self, pyramid_request):
        pyramid_request.POST['q'] = 'foo bar'

        location = activity.delete_lozenge(pyramid_request).location

        location == 'http://example.com/search?q=foo+bar'
Exemple #4
0
    def test_it_preserves_the_query_param(self, pyramid_request):
        pyramid_request.POST['q'] = 'foo bar'

        location = activity.delete_lozenge(pyramid_request).location

        location == 'http://example.com/search?q=foo+bar'