Show
Ignore:
Timestamp:
08/25/08 10:49:51 (5 years ago)
Author:
Nicolas ?vrard <nicoe@…>
Branch:
default
Message:

Added test for _guess_type

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • relatorio/tests/test_api.py

    r60 r61  
    2424 
    2525from reporting import (ReportRepository, Report, MIMETemplateLoader, 
    26                        DefaultFactory, _absolute) 
     26                       DefaultFactory, _absolute, _guess_type) 
    2727 
    2828 
     
    5757        eq_(name, 'default') 
    5858        eq_(report, report2) 
     59 
     60    def test_mimeguesser(self): 
     61        eq_(_guess_type('application/pdf'), 'pdf') 
     62        eq_(_guess_type('text/plain'), 'text') 
     63        eq_(_guess_type('text/xhtml'), 'markup') 
     64        eq_(_guess_type('application/vnd.oasis.opendocument.text'), 'oo.org') 
    5965 
    6066    def abspath_helper(self, path):