#24330: Test suites for modular components - storage class, cache backends.
-----------------------------------+------------------------------
     Reporter:  georgewhewell      |      Owner:  nobody
         Type:  New feature        |     Status:  new
    Component:  Testing framework  |    Version:  1.7
     Severity:  Normal             |   Keywords:  testing, storage
 Triage Stage:  Unreviewed         |  Has patch:  0
Easy pickings:  0                  |      UI/UX:  0
-----------------------------------+------------------------------
 When implementing a custom storage class, there seems to be no way to
 confirm that it is behaving as expected by django. It would be useful to
 have a test suite that only used the interface provided by the
 DEFAULT_FILE_STORAGE class and checked things like saving and reading a
 file returns the same content, seeking, .url method. As not all methods
 appear mandatory, these could be skipped for backends which don't
 implement them.

 For example, the django-storages package's documentation for FTP
 backend[1] reads:

     This implementation was done preliminary for upload files in admin to
 remote FTP location and read them back on site by HTTP. It was tested
 mostly in this configuration, so read/write using FTPStorageFile class may
 break.

 It would be nice to be able to run the same tests against this backend by
 overriding the DEFAULT_FILE_STORAGE setting to determine if it will break
 or not.

 [1] https://django-storages.readthedocs.org/en/latest/backends/ftp.html

--
Ticket URL: <https://code.djangoproject.com/ticket/24330>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/056.7f3e9683e8a967690c812f0d3e7f1bcb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to