예제 #1
0
    def test_it_instantiates_a_templater(self, pyramid_request, AngularRouteTemplater):
        views.index_v2(None, pyramid_request)

        AngularRouteTemplater.assert_called_once_with(
            pyramid_request.route_url,
            params=["id", "pubid", "user", "userid", "username"],
        )
예제 #2
0
파일: index_test.py 프로젝트: hypothesis/h
    def test_it_instantiates_a_templater(self, pyramid_request, AngularRouteTemplater):
        views.index_v2(None, pyramid_request)

        AngularRouteTemplater.assert_called_once_with(
            pyramid_request.route_url,
            params=["id", "pubid", "user", "userid", "username"],
        )
예제 #3
0
    def test_it_returns_links_for_the_right_version(
        self, pyramid_request, AngularRouteTemplater, link_helpers
    ):
        views.index_v2(None, pyramid_request)

        link_helpers.format_nested_links.assert_called_once_with(
            pyramid_request.registry.api_links["v2"], AngularRouteTemplater.return_value
        )
예제 #4
0
파일: index_test.py 프로젝트: hypothesis/h
    def test_it_returns_links_for_the_right_version(
        self, pyramid_request, AngularRouteTemplater, link_helpers
    ):
        views.index_v2(None, pyramid_request)

        link_helpers.format_nested_links.assert_called_once_with(
            pyramid_request.registry.api_links["v2"], AngularRouteTemplater.return_value
        )
예제 #5
0
    def test_it_returns_links(self, pyramid_request):
        result = views.index_v2(None, pyramid_request)

        assert "links" in result
예제 #6
0
파일: index_test.py 프로젝트: hypothesis/h
    def test_it_returns_links(self, pyramid_request):
        result = views.index_v2(None, pyramid_request)

        assert "links" in result