| 9 | | Now I do not get errors using WHITENOISE_USE_FINDERS=True and WHITENOISE_AUTOREFRESH=True which can be used in StaticLiveServerTestCase to achieve running tests without collectstatic first. See: tests/staticfiles_tests/test_liverserver.StaticLiveServerViewUseFinders.test_collectstatic_emulation |
| 10 | | Does anybody know why WHITENOISE_USE_FINDERS is ignored in WhiteNoiseMiddleware? |
| 11 | | See: tests/staticfiles_tests/test_liverserver.TestWhitenoiseMiddleware.test_collectstatic_emulation |
| | 9 | Now I do not get errors using WHITENOISE_USE_FINDERS=True and WHITENOISE_AUTOREFRESH=True which can be used in StaticLiveServerTestCase to achieve running tests without collectstatic first. |
| | 10 | See: tests/staticfiles_tests/test_liverserver.StaticLiveServerViewUseFinders.test_collectstatic_emulation |
| | 11 | See: tests/staticfiles_tests/test_liverserver.TestWhitenoiseMiddlewareUseFinders.test_collectstatic_emulation |
| | 12 | |
| | 13 | Does anybody know why overriding_settings within a test method has no effect? |
| | 14 | |
| | 15 | For example: |
| | 16 | |
| | 17 | {{{ |
| | 18 | with self.settings(WHITENOISE_USE_FINDERS=True, WHITENOISE_AUTOREFRESH=True): |
| | 19 | response = self.client.get('/static/test/file.txt') |
| | 20 | content = b'' |
| | 21 | for item in response.streaming_content: |
| | 22 | content += item |
| | 23 | self.assertEqual(content.rstrip(b'\r\n'), b'In static directory.') |
| | 24 | }}} |