Verified Commit 640a72c5 authored by Sli's avatar Sli

core: add tests for UserToolsView

parent 9b7b96a3
Pipeline #1920 failed with stage
in 5 minutes and 30 seconds
......@@ -396,6 +396,21 @@ http://git.an
)
class UserToolsTest(TestCase):
def setUp(self):
call_command("populate")
def test_anonymous_user_unauthorized(self):
response = self.client.get(reverse("core:user_tools"))
self.assertEquals(response.status_code, 403)
def test_page_is_working(self):
self.client.login(username="guy", password="plop")
response = self.client.get(reverse("core:user_tools"))
self.assertNotEquals(response.status_code, 500)
self.assertEquals(response.status_code, 200)
# TODO: many tests on the pages:
# - renaming a page
# - changing a page's parent --> check that page's children's full_name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment