First tests for imdb module

This commit is contained in:
2023-01-20 13:02:32 -05:00
parent 13bdc201f0
commit cbe4abfb5f
3 changed files with 16 additions and 2 deletions

View File

@ -0,0 +1,12 @@
import pytest
import imdb
from mock import patch
from vrobbler.apps.scrobbles.imdb import lookup_video_from_imdb
def test_lookup_imdb_bad_id(caplog):
data = lookup_video_from_imdb('3409324')
assert data is None
assert caplog.records[0].levelname == "WARNING"
assert caplog.records[0].msg == "IMDB ID should begin with 'tt' 3409324"