Exemplo n.º 1
0
    def test_get_all_includes_nonhidden_links(self, registry):
        svc = LinksService(base_url="http://example.com", registry=registry)

        result = svc.get_all(mock.sentinel.annotation)

        assert result["giraffe"] == "http://giraffes.com"
        assert result["elephant"] == "https://elephant.org"
Exemplo n.º 2
0
    def test_get_all_includes_nonhidden_links(self, registry):
        svc = LinksService(base_url='http://example.com', registry=registry)

        result = svc.get_all(mock.sentinel.annotation)

        assert result['giraffe'] == 'http://giraffes.com'
        assert result['elephant'] == 'https://elephant.org'
Exemplo n.º 3
0
    def test_get_all_does_not_include_links_returning_none(self, registry):
        svc = LinksService(base_url="http://example.com", registry=registry)

        result = svc.get_all(mock.sentinel.annotation)

        assert "returnsnone" not in result
Exemplo n.º 4
0
    def test_get_all_does_not_include_hidden_links(self, registry):
        svc = LinksService(base_url="http://example.com", registry=registry)

        result = svc.get_all(mock.sentinel.annotation)

        assert "kiwi" not in result
Exemplo n.º 5
0
    def test_get_all_does_not_include_links_returning_none(self, registry):
        svc = LinksService(base_url='http://example.com', registry=registry)

        result = svc.get_all(mock.sentinel.annotation)

        assert 'returnsnone' not in result
Exemplo n.º 6
0
    def test_get_all_does_not_include_hidden_links(self, registry):
        svc = LinksService(base_url='http://example.com', registry=registry)

        result = svc.get_all(mock.sentinel.annotation)

        assert 'kiwi' not in result