コード例 #1
0
def test_get_model_for_invalid_type():
    with pytest.raises(LookupError):
        common.get_model_for_type('foobar')
コード例 #2
0
def test_get_model_for_valid_type(model_type, model_class):
    assert common.get_model_for_type(model_type) == model_class
コード例 #3
0
ファイル: test_common.py プロジェクト: zeitounator/awx
def test_get_model_for_invalid_type():
    with pytest.raises(DatabaseError) as exc:
        get_model_for_type('foobar')
    assert 'not a valid AWX model' in str(exc)