Beispiel #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"],
        )
Beispiel #2
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"],
        )
Beispiel #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
        )
Beispiel #4
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
        )
Beispiel #5
0
    def test_it_returns_links(self, pyramid_request):
        result = views.index_v2(None, pyramid_request)

        assert "links" in result
Beispiel #6
0
    def test_it_returns_links(self, pyramid_request):
        result = views.index_v2(None, pyramid_request)

        assert "links" in result