-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This fails:
def test_metadata_with_returns():
class MyProduct(Product):
pass
class CustomProductPage(ProductPage, Returns[MyProduct]):
pass
url = ResponseUrl("https://example.com")
html = b""
page = CustomProductPage(response=HttpResponse(url=url, body=html))
metadata = page.metadata @field
def metadata(self) -> MetadataT:
> value = self.metadata_cls()
E TypeError: 'NoneType' object is not callable
zyte_common_items/pages.py:67: TypeError
zyte_common_items.pages._get_metadata_class in the case of this CustomProductPage cannot find any HasMetadata base and returns None.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working