示例#1
0
    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 == ''
示例#2
0
    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 == ''
示例#3
0
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 == ""
示例#4
0
    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 == ''
示例#5
0
    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 == ''