Exemple #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'
Exemple #2
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
Exemple #3
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