Ejemplo n.º 1
0
    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')
Ejemplo n.º 2
0
    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')
Ejemplo n.º 3
0
def clean_format(format):
    return h.unified_resource_format(format)
Ejemplo n.º 4
0
def clean_format(format):
    return h.unified_resource_format(format)
Ejemplo n.º 5
0
def test_unified_resource_format(fmt, exp):
    assert h.unified_resource_format(fmt) == exp
Ejemplo n.º 6
0
 def test_unified_resource_format_by_alternative_description2(self):
     eq_(h.unified_resource_format('Excel'), 'XLS')
Ejemplo n.º 7
0
 def test_unified_resource_format_by_alternative_description(self):
     eq_(h.unified_resource_format('application/msexcel'), 'XLS')
Ejemplo n.º 8
0
 def test_unified_resource_format_by_primary_mimetype(self):
     eq_(h.unified_resource_format('application/vnd.ms-excel'), 'XLS')
Ejemplo n.º 9
0
 def test_unified_resource_format_by_description(self):
     eq_(h.unified_resource_format('Excel document'), 'XLS')
Ejemplo n.º 10
0
 def test_unified_resource_format_by_extension(self):
     eq_(h.unified_resource_format('xls'), 'XLS')
Ejemplo n.º 11
0
 def test_unified_resource_format_by_alternative_description2(self):
     eq_(h.unified_resource_format('Excel'), 'XLS')
Ejemplo n.º 12
0
 def test_unified_resource_format_by_alternative_description(self):
     eq_(h.unified_resource_format('application/msexcel'), 'XLS')
Ejemplo n.º 13
0
 def test_unified_resource_format_by_primary_mimetype(self):
     eq_(h.unified_resource_format('application/vnd.ms-excel'), 'XLS')
Ejemplo n.º 14
0
 def test_unified_resource_format_by_description(self):
     eq_(h.unified_resource_format('Excel document'), 'XLS')
Ejemplo n.º 15
0
 def test_unified_resource_format_by_extension(self):
     eq_(h.unified_resource_format('xls'), 'XLS')
Ejemplo n.º 16
0
def clean_format(format: str):
    """Normalize resource's format.
    """
    return h.unified_resource_format(format)