harbor run -t openthoughts/tasktrove-exp-rpt-stack-pytest-v2-stack-pytest-0492harbor download openthoughts/tasktrove-exp-rpt-stack-pytest-v2-stack-pytest-0492Task: Implement a Python package silene with a Cookie model that satisfies the given tests
Overview:
What to implement (exact functionality and signatures):
Class signature: class Cookie: def init( self, name: str, value: str, domain: Optional[str] = None, path: Optional[str] = None, expires: Optional[int] = None, http_only: Optional[bool] = None, secure: Optional[bool] = None, session: Optional[bool] = None, same_site: Optional[str] = None, ) -> None
Attribute assignment in init:
Property expectations (based on tests):
Note: The tests compare to cookie_dict which contains only the six keys above; do not include http_only, secure, or same_site in this dictionary.
@classmethod def from_dict(cls, data: dict) -> 'Cookie'
Behavior:
This must satisfy the tests:
str method
The test uses str(cookie) against that exact string, so implement str to format with the values of the instance in that order and with the literal 'Cookie(' starting and ')' ending.
Actionable deliverable:
Note: If you must place the implementation as a single module, ensure the package structure is still effectively available to tests via silene.cookie.Cookie. The primary requirement is that the tests can import Cookie from silene.cookie.