def test_parse_search_empty_shortname(): fname = get_file('search_empty_shortname.xml') with pytest.raises(forms.ValidationError) as excinfo: utils.parse_search(fname) assert ( excinfo.value[0] == 'Could not parse uploaded file, missing or empty <ShortName> element')
def test_parse_search_empty_shortname(): fname = get_file('search_empty_shortname.xml') with pytest.raises(forms.ValidationError) as excinfo: utils.parse_search(fname) assert ( six.text_type(excinfo.value.message) == 'Could not parse uploaded file, missing or empty <ShortName> element')
def test_parse_search_empty_shortname(): from olympia.files.tests.test_file_viewer import get_file fname = get_file('search_empty_shortname.xml') with pytest.raises(forms.ValidationError) as excinfo: utils.parse_search(fname) assert (str( excinfo.value.message ) == 'Could not parse uploaded file, missing or empty <ShortName> element')