Beispiel #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"
Beispiel #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'
Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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