def test_clean_format(self): format = validators.clean_format('csv') assert format == 'CSV' format = validators.clean_format('text/csv') assert format == 'CSV' format = validators.clean_format('not a format') assert format == 'not a format' format = validators.clean_format('') assert format == ''
def test_clean_format(): format = validators.clean_format("csv") assert format == "CSV" format = validators.clean_format("text/csv") assert format == "CSV" format = validators.clean_format("not a format") assert format == "not a format" format = validators.clean_format("") assert format == ""
def test_clean_format(self): import ckan.logic.validators as validators format = validators.clean_format('csv') assert format == 'CSV' format = validators.clean_format('text/csv') assert format == 'CSV' format = validators.clean_format('not a format') assert format == 'not a format' format = validators.clean_format('') assert format == ''