示例#1
0
def test_movie_fromguess_insufficient_data(movies):
    guess = {'type': 'movie'}
    with pytest.raises(ValueError) as excinfo:
        Movie.fromguess(movies['man_of_steel'].name, guess)
    assert str(excinfo.value) == 'Insufficient data to process the guess'
示例#2
0
def test_movie_fromguess_wrong_type(movies):
    guess = {'type': 'subtitle'}
    with pytest.raises(ValueError) as excinfo:
        Movie.fromguess(movies['man_of_steel'].name, guess)
    assert str(excinfo.value) == 'The guess must be a movie guess'
示例#3
0
def test_movie_fromguess_insufficient_data(movies):
    guess = {'type': 'movie'}
    with pytest.raises(ValueError) as excinfo:
        Movie.fromguess(movies['man_of_steel'].name, guess)
    assert str(excinfo.value) == 'Insufficient data to process the guess'
示例#4
0
def test_movie_fromguess_wrong_type(movies):
    guess = {'type': 'subtitle'}
    with pytest.raises(ValueError) as excinfo:
        Movie.fromguess(movies['man_of_steel'].name, guess)
    assert str(excinfo.value) == 'The guess must be a movie guess'
示例#5
0
def test_movie_fromguess_insufficient_data(movies):
    guess = {"type": "movie"}
    with pytest.raises(ValueError) as excinfo:
        Movie.fromguess(movies["man_of_steel"].name, guess)
    assert str(excinfo.value) == "Insufficient data to process the guess"
示例#6
0
def test_movie_fromguess_wrong_type(movies):
    guess = {"type": "subtitle"}
    with pytest.raises(ValueError) as excinfo:
        Movie.fromguess(movies["man_of_steel"].name, guess)
    assert str(excinfo.value) == "The guess must be a movie guess"