import datetime from nebula_rss import __version__, NebulaLoader from bs4 import BeautifulSoup def test_version(): assert __version__ == '0.1.0' def test_video_parsing(): example_div = '
' # noqa soup = BeautifulSoup(example_div, features='lxml') anchor = soup.div.a video = NebulaLoader._parse_anchor(anchor) assert video.title == 'The Bug That Created “Free Public Wifi” Networks That Didn’t Work' assert video.creator == 'Half as Interesting' assert video.url == 'https://nebula.app/videos/hai-the-bug-that-created-free-public-wifi-networks-that-didnt-work' assert video.release_at == datetime.datetime(2022, 1, 6, 15, 39, 39, tzinfo=datetime.timezone.utc) print(video)