equal
deleted
inserted
replaced
21 from functools import partial |
21 from functools import partial |
22 |
22 |
23 from pytz import utc |
23 from pytz import utc |
24 |
24 |
25 from cubicweb.devtools.testlib import CubicWebTC, real_error_handling |
25 from cubicweb.devtools.testlib import CubicWebTC, real_error_handling |
26 from cubicweb import view |
26 from cubicweb.entity import EntityAdapter |
27 from cubicweb.predicates import is_instance |
27 from cubicweb.predicates import is_instance |
28 from cubicweb.web import http_headers |
28 from cubicweb.web import http_headers |
29 |
29 |
30 |
30 |
31 class IDownloadableUser(view.EntityAdapter): |
31 class IDownloadableUser(EntityAdapter): |
32 __regid__ = 'IDownloadable' |
32 __regid__ = 'IDownloadable' |
33 __select__ = is_instance('CWUser') |
33 __select__ = is_instance('CWUser') |
34 |
34 |
35 def download_content_type(self): |
35 def download_content_type(self): |
36 """return MIME type of the downloadable content""" |
36 """return MIME type of the downloadable content""" |