mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 00:46:18 +00:00
Fixes unit tests
This commit is contained in:
parent
bad81b7fe5
commit
ee9cb7a66d
@ -28,12 +28,12 @@ class FolderTestCase(FrontendTestBase):
|
|||||||
self._login("bob", "B0b")
|
self._login("bob", "B0b")
|
||||||
rv = self.client.get("/folder/add", follow_redirects=True)
|
rv = self.client.get("/folder/add", follow_redirects=True)
|
||||||
self.assertIn("There's nothing much to see", rv.data)
|
self.assertIn("There's nothing much to see", rv.data)
|
||||||
self.assertNotIn("Add Folder", rv.data)
|
self.assertNotIn("Add new folder", rv.data)
|
||||||
self._logout()
|
self._logout()
|
||||||
|
|
||||||
self._login("alice", "Alic3")
|
self._login("alice", "Alic3")
|
||||||
rv = self.client.get("/folder/add")
|
rv = self.client.get("/folder/add")
|
||||||
self.assertIn("Add Folder", rv.data)
|
self.assertIn("Add new folder", rv.data)
|
||||||
|
|
||||||
def test_add_post(self):
|
def test_add_post(self):
|
||||||
self._login("alice", "Alic3")
|
self._login("alice", "Alic3")
|
||||||
@ -44,7 +44,7 @@ class FolderTestCase(FrontendTestBase):
|
|||||||
rv = self.client.post("/folder/add", data={"path": "path"})
|
rv = self.client.post("/folder/add", data={"path": "path"})
|
||||||
self.assertIn("required", rv.data)
|
self.assertIn("required", rv.data)
|
||||||
rv = self.client.post("/folder/add", data={"name": "name", "path": "path"})
|
rv = self.client.post("/folder/add", data={"name": "name", "path": "path"})
|
||||||
self.assertIn("Add Folder", rv.data)
|
self.assertIn("Add new folder", rv.data)
|
||||||
rv = self.client.post(
|
rv = self.client.post(
|
||||||
"/folder/add",
|
"/folder/add",
|
||||||
data={"name": "name", "path": "tests/assets"},
|
data={"name": "name", "path": "tests/assets"},
|
||||||
|
@ -49,7 +49,7 @@ class UserTestCase(FrontendTestBase):
|
|||||||
self.assertIn("There's nothing much to see", rv.data)
|
self.assertIn("There's nothing much to see", rv.data)
|
||||||
self.assertNotIn("<h2>bob</h2>", rv.data)
|
self.assertNotIn("<h2>bob</h2>", rv.data)
|
||||||
rv = self.client.get("/user/me")
|
rv = self.client.get("/user/me")
|
||||||
self.assertIn("<h2>bob</h2>", rv.data)
|
self.assertIn("<h2 class=\"mt-4 pb-2 border-bottom\">bob</h2>", rv.data)
|
||||||
self.assertIn("tests", rv.data)
|
self.assertIn("tests", rv.data)
|
||||||
|
|
||||||
def test_update_client_prefs(self):
|
def test_update_client_prefs(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user