Wednesday, September 26, 2018

Re: DEFAULT_FILE_STORAGE and tests

Ciao Luca!

On Tue, Sep 25, 2018 at 12:29:45PM -0700, Luca Bocchi wrote:
> Already tried with:
> class GeneraliDiscoverRunner(DiscoverRunner):
> def setup_test_environment(self, **kwargs):
> settings.DEFAULT_FILE_STORAGE = 'web.storage.TestStorage'
> super().setup_test_environment(**kwargs)
> ?
> otherwise, I'd say to run the test with a custom settings module like
> ./manage.py test --settings=test_settings

This seems to be the only viable solution, thanks


> or
> try to override that value in the setUp method of your TestCase class.

I did try this as well and to my surprise it didn't work eather, even
thought I should spend more time debugging why...

sandro

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20180926122138.GA16185%40bluff.e-den.it.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment