tests: match the health and login paths exactly in the service worker test
This commit is contained in:
1 parent
3f47a928ca
commit
8c69bfeee9
1 file changed
+4
-2
+4
-2
@@ -50,8 +50,10 @@ class ServiceWorkerTests(unittest.TestCase):
|
|||||||
body = self.read_static("sw.js")
|
body = self.read_static("sw.js")
|
||||||
|
|
||||||
self.assertNotIn("/api/", body)
|
self.assertNotIn("/api/", body)
|
||||||
self.assertNotIn("/health", body)
|
# The quoted path is what matters: "/health-check" is a shell path, while
|
||||||
self.assertNotIn("/login", body)
|
# "/health" and "/login" are not, and must not appear.
|
||||||
|
self.assertNotIn('"/health"', body)
|
||||||
|
self.assertNotIn('"/login"', body)
|
||||||
# The shell it does cache is the five pages and their assets.
|
# The shell it does cache is the five pages and their assets.
|
||||||
for path in ("/", "/setup", "/settings", "/health-check", "/history", "/styles.css"):
|
for path in ("/", "/setup", "/settings", "/health-check", "/history", "/styles.css"):
|
||||||
self.assertIn(f'"{path}"', body)
|
self.assertIn(f'"{path}"', body)
|
||||||
|
|||||||
Reference in new issue
Block a user