예제 #1
0
    def test_redirects_to_client_boot_script(self, pyramid_request):
        pyramid_request.feature.flags["embed_cachebuster"] = False

        rsp = client.embed_redirect(pyramid_request)

        assert isinstance(rsp, HTTPFound)
        assert rsp.location == "http://example.com/client_url"
예제 #2
0
    def test_adds_cachebuster(self, pyramid_request):
        pyramid_request.feature.flags["embed_cachebuster"] = True

        rsp = client.embed_redirect(pyramid_request)

        assert isinstance(rsp, HTTPFound)
        assert "?cachebuster=" in rsp.location
예제 #3
0
    def test_redirects_to_client_boot_script(self, pyramid_request):
        pyramid_request.feature.flags["embed_cachebuster"] = False

        rsp = client.embed_redirect(pyramid_request)

        assert isinstance(rsp, HTTPFound)
        assert rsp.location == "https://cdn.hypothes.is/hypothesis"
예제 #4
0
    def test_adds_cachebuster(self, pyramid_request):
        pyramid_request.feature.flags['embed_cachebuster'] = True

        rsp = client.embed_redirect(pyramid_request)

        assert isinstance(rsp, HTTPFound)
        assert '?cachebuster=' in rsp.location
예제 #5
0
    def test_redirects_to_client_boot_script(self, pyramid_request):
        pyramid_request.feature.flags['embed_cachebuster'] = False

        rsp = client.embed_redirect(pyramid_request)

        assert isinstance(rsp, HTTPFound)
        assert rsp.location == 'https://cdn.hypothes.is/hypothesis'
예제 #6
0
    def test_redirects_to_client_boot_script(self, pyramid_request):
        rsp = client.embed_redirect(pyramid_request)

        assert isinstance(rsp, HTTPFound)
        assert rsp.location == 'https://cdn.hypothes.is/hypothesis'
예제 #7
0
    def test_redirects_to_client_boot_script(self, pyramid_request):
        rsp = client.embed_redirect(pyramid_request)

        assert isinstance(rsp, HTTPFound)
        assert rsp.location == "http://example.com/client_url"
예제 #8
0
파일: client_test.py 프로젝트: gnott/h
    def test_redirects_to_client_boot_script(self, pyramid_request):
        rsp = client.embed_redirect(pyramid_request)

        assert isinstance(rsp, HTTPFound)
        assert rsp.location == 'https://cdn.hypothes.is/hypothesis'