Page MenuHomeSoftware Heritage

D8987.id32369.diff
No OneTemporary

D8987.id32369.diff

diff --git a/swh/graphql/resolvers/base_connection.py b/swh/graphql/resolvers/base_connection.py
--- a/swh/graphql/resolvers/base_connection.py
+++ b/swh/graphql/resolvers/base_connection.py
@@ -110,7 +110,6 @@
return a PagedResult object
"""
# FIXME, make this call async (not for v1)
- return None
def _get_after_arg(self):
"""
diff --git a/swh/graphql/resolvers/base_node.py b/swh/graphql/resolvers/base_node.py
--- a/swh/graphql/resolvers/base_node.py
+++ b/swh/graphql/resolvers/base_node.py
@@ -70,7 +70,6 @@
This will be called only when node_data is None
"""
# FIXME, make this call async (not for v1)
- return None
def __getattr__(self, name: str) -> Any:
"""
diff --git a/swh/graphql/tests/unit/resolvers/test_base_node.py b/swh/graphql/tests/unit/resolvers/test_base_node.py
deleted file mode 100644
--- a/swh/graphql/tests/unit/resolvers/test_base_node.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2022 The Software Heritage developers
-# See the AUTHORS file at the top-level directory of this distribution
-# License: GNU General Public License version 3, or any later version
-# See top-level LICENSE file for more information
-
-"""
-"""
-
-
-class TestBaseNode:
- def test_init(self):
- pass
-
- def test_get_node(self):
- pass
-
- def test_get_node_from_data(self):
- pass
-
- def test_handle_node_errors(self):
- pass
-
- def test_get_node_data(self):
- pass
-
- def test_getattr(self):
- pass
-
- def test_is_type_of(sellf):
- pass
diff --git a/swh/graphql/tests/unit/resolvers/test_origin.py b/swh/graphql/tests/unit/resolvers/test_origin.py
deleted file mode 100644
--- a/swh/graphql/tests/unit/resolvers/test_origin.py
+++ /dev/null
@@ -1 +0,0 @@
-pass
diff --git a/swh/graphql/tests/unit/resolvers/test_resolver_factory.py b/swh/graphql/tests/unit/resolvers/test_resolver_factory.py
--- a/swh/graphql/tests/unit/resolvers/test_resolver_factory.py
+++ b/swh/graphql/tests/unit/resolvers/test_resolver_factory.py
@@ -16,3 +16,7 @@
def test_get_connection_resolver_invalid_type(self):
with pytest.raises(AttributeError):
resolver_factory.ConnectionObjectFactory().create("invalid", None, None)
+
+ def test_get_list_resolver_invalid_type(self):
+ with pytest.raises(AttributeError):
+ resolver_factory.SimpleListFactory().create("invalid", None, None)

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 11:54 AM (14 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3213794

Event Timeline