Update with last fixes
This commit is contained in:
@@ -16,7 +16,7 @@ class AdminHandlersTest(SiteTestCase):
|
||||
super().setUp()
|
||||
self.clock = Clock()
|
||||
self.auth = AuthService(make_cfg(), self.tmp / "state", clock=self.clock)
|
||||
self.h = AdminHandlers(self.auth, self.site)
|
||||
self.h = AdminHandlers(self.auth, self.site, self.tmp / "dist")
|
||||
|
||||
def cookie_value(self, result):
|
||||
header = result.cookies[0]
|
||||
@@ -91,6 +91,15 @@ class AdminHandlersTest(SiteTestCase):
|
||||
self.assertIn("name='csrf'", result.body)
|
||||
self.assertIn("no-store", result.headers["Cache-Control"])
|
||||
|
||||
def test_dashboard_shows_the_absolute_paths_in_use(self):
|
||||
body = self.h.dashboard(self.login()).body
|
||||
for path in (self.site.resolve(), (self.tmp / "dist").resolve(), (self.tmp / "state").resolve()):
|
||||
self.assertIn(str(path), body)
|
||||
|
||||
def test_missing_site_error_names_the_absolute_path(self):
|
||||
(self.site / "site.yaml").unlink()
|
||||
self.assertIn(str(self.site.resolve()), self.h.dashboard(self.login()).body)
|
||||
|
||||
def test_dashboard_shows_broken_site_instead_of_crashing(self):
|
||||
(self.site / "site.yaml").unlink()
|
||||
result = self.h.dashboard(self.login())
|
||||
|
||||
Reference in New Issue
Block a user