Source code for tests.Accounts.tests

from django.test import TestCase,SimpleTestCase
from django.utils import timezone
from django.test import Client


# URLs tests.

[docs] class Account_Login_Root_URLTests():
[docs] def test_url_exists_at_correct_location(self): client=Client() response = client.get('/notes/list') assert response.status_code == 302 #redirect to login
[docs] def test_admin_page(): client = Client() client.login(username="admin", password="your_password") response = client.get("/admin/") assert response.status_code == 200