コード例 #1
0
ファイル: test_helpers.py プロジェクト: mattfullerton/ckan
    def test_autodetect_tsv(self):

        eq_(h.unified_resource_format('tsv'), 'TSV')

        eq_(h.unified_resource_format('text/tab-separated-values'), 'TSV')

        eq_(h.unified_resource_format('text/tsv'), 'TSV')
コード例 #2
0
ファイル: test_helpers.py プロジェクト: xbian/ckan
    def test_autodetect_tsv(self):

        eq_(h.unified_resource_format('tsv'), 'TSV')

        eq_(h.unified_resource_format('text/tab-separated-values'), 'TSV')

        eq_(h.unified_resource_format('text/tsv'), 'TSV')
コード例 #3
0
ファイル: validators.py プロジェクト: depositar/ckan
def clean_format(format):
    return h.unified_resource_format(format)
コード例 #4
0
ファイル: validators.py プロジェクト: PublicaMundi/ckan
def clean_format(format):
    return h.unified_resource_format(format)
コード例 #5
0
ファイル: test_helpers.py プロジェクト: wijwij/ckan
def test_unified_resource_format(fmt, exp):
    assert h.unified_resource_format(fmt) == exp
コード例 #6
0
ファイル: test_helpers.py プロジェクト: BetaNYC/ckan-1
 def test_unified_resource_format_by_alternative_description2(self):
     eq_(h.unified_resource_format('Excel'), 'XLS')
コード例 #7
0
ファイル: test_helpers.py プロジェクト: BetaNYC/ckan-1
 def test_unified_resource_format_by_alternative_description(self):
     eq_(h.unified_resource_format('application/msexcel'), 'XLS')
コード例 #8
0
ファイル: test_helpers.py プロジェクト: BetaNYC/ckan-1
 def test_unified_resource_format_by_primary_mimetype(self):
     eq_(h.unified_resource_format('application/vnd.ms-excel'), 'XLS')
コード例 #9
0
ファイル: test_helpers.py プロジェクト: BetaNYC/ckan-1
 def test_unified_resource_format_by_description(self):
     eq_(h.unified_resource_format('Excel document'), 'XLS')
コード例 #10
0
ファイル: test_helpers.py プロジェクト: BetaNYC/ckan-1
 def test_unified_resource_format_by_extension(self):
     eq_(h.unified_resource_format('xls'), 'XLS')
コード例 #11
0
ファイル: test_helpers.py プロジェクト: mattfullerton/ckan
 def test_unified_resource_format_by_alternative_description2(self):
     eq_(h.unified_resource_format('Excel'), 'XLS')
コード例 #12
0
ファイル: test_helpers.py プロジェクト: mattfullerton/ckan
 def test_unified_resource_format_by_alternative_description(self):
     eq_(h.unified_resource_format('application/msexcel'), 'XLS')
コード例 #13
0
ファイル: test_helpers.py プロジェクト: mattfullerton/ckan
 def test_unified_resource_format_by_primary_mimetype(self):
     eq_(h.unified_resource_format('application/vnd.ms-excel'), 'XLS')
コード例 #14
0
ファイル: test_helpers.py プロジェクト: mattfullerton/ckan
 def test_unified_resource_format_by_description(self):
     eq_(h.unified_resource_format('Excel document'), 'XLS')
コード例 #15
0
ファイル: test_helpers.py プロジェクト: mattfullerton/ckan
 def test_unified_resource_format_by_extension(self):
     eq_(h.unified_resource_format('xls'), 'XLS')
コード例 #16
0
ファイル: validators.py プロジェクト: tino097/ckan
def clean_format(format: str):
    """Normalize resource's format.
    """
    return h.unified_resource_format(format)