On 28/02/2020 1:31 am, One Above All wrote:
> I am updating a settings in my test which should raise exception on
> illegal entries, but merely updating settings does not make django
> perform system checks. Is there any method which I can call to trigger
> those checks?
https://docs.djangoproject.com/en/2.2/topics/settings/#using-settings-without-setting-django-settings-module
Look at the configure() method. In particular, you might want to save
one or more settings values, change them for some of the tests and then
switch them back. I would probably isolate such tests in a separate
module and use the setUP and tearDown methods to fix the adjusted settings.
Good luck
Mike
> --
> 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
> <mailto:django-users+unsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7e9b4e35-0b4a-4c2b-864a-8631ff83ac8b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/7e9b4e35-0b4a-4c2b-864a-8631ff83ac8b%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cc721f99-5791-21df-d5a8-ca1fa0cd078c%40dewhirst.com.au.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment