PageRenderTime 20ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/tests/regressiontests/staticfiles_tests/storage.py

https://code.google.com/p/mango-py/
Python | 19 lines | 11 code | 4 blank | 4 comment | 0 complexity | d0cafcf970119f64f25d0f4277c36b89 MD5 | raw file
 1from datetime import datetime
 2from django.core.files import storage
 3
 4class DummyStorage(storage.Storage):
 5    """
 6    A storage class that does implement modified_time() but raises
 7    NotImplementedError when calling 
 8    """
 9    def _save(self, name, content):
10        return 'dummy'
11
12    def delete(self, name):
13        pass
14
15    def exists(self, name):
16        pass
17
18    def modified_time(self, name):
19        return datetime.date(1970, 1, 1)