def test_invalid_user_agent(user_agent):
    with pytest.raises(ValueError):
        ua.parse(user_agent)
def test_ignored_user_agent(user_agent):
    assert ua.parse(user_agent) is None
def test_valid_user_agent(user_agent, expected):
    assert ua.parse(user_agent) == ua.UserAgent.create(expected)
Esempio n. 4
0
def test_invalid_user_agent(user_agent):
    with pytest.raises(ValueError):
        ua.parse(user_agent)
Esempio n. 5
0
def test_ignored_user_agent(user_agent):
    assert ua.parse(user_agent) is None
Esempio n. 6
0
def test_valid_user_agent(user_agent, expected):
    assert ua.parse(user_agent) == ua.UserAgent.create(expected)