def publish_date(self): """Get the publish date. :rtype: datetime """ return extract.publish_date(self.watch_html)
def publish_date(self): """Get the publish date. :rtype: datetime """ if self._publish_date: return self._publish_date self._publish_date = extract.publish_date(self.watch_html) return self._publish_date
def test_publish_date(cipher_signature): expected = datetime(2019, 12, 5) assert cipher_signature.publish_date == expected assert extract.publish_date('') is None