A Py3.3+ namespace package with multiple locations cannot be an app. (Because then we wouldn't know where to load its templates, static assets, etc. from.)
(self)
| 548 | self.assertEqual(app_config.path, self.app_path) |
| 549 | |
| 550 | def test_multiple_paths(self): |
| 551 | """ |
| 552 | A Py3.3+ namespace package with multiple locations cannot be an app. |
| 553 | |
| 554 | (Because then we wouldn't know where to load its templates, static |
| 555 | assets, etc. from.) |
| 556 | """ |
| 557 | # Temporarily add two directories to sys.path that both contain |
| 558 | # components of the "nsapp" package. |
| 559 | with extend_sys_path(self.base_location, self.other_location): |
| 560 | with self.assertRaises(ImproperlyConfigured): |
| 561 | with self.settings(INSTALLED_APPS=["nsapp"]): |
| 562 | pass |
| 563 | |
| 564 | def test_multiple_paths_explicit_path(self): |
| 565 | """ |
nothing calls this directly
no test coverage detected