mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
core: add tests for UserToolsView
This commit is contained in:
parent
9b7b96a310
commit
640a72c52d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user