test: use BaseTestUtils in test_auth for consistent test setup
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.tests.test_api import FrappeAPITestCase
|
from frappe.tests.test_api import FrappeAPITestCase
|
||||||
|
|
||||||
|
from lms.auth import authenticate
|
||||||
from lms.lms.test_helpers import BaseTestUtils
|
from lms.lms.test_helpers import BaseTestUtils
|
||||||
|
|
||||||
|
|
||||||
class TestAuth(FrappeAPITestCase, BaseTestUtils):
|
class TestAuth(BaseTestUtils, FrappeAPITestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super().setUp()
|
super().setUp()
|
||||||
BaseTestUtils.setUp(self)
|
|
||||||
self.normal_user = self._create_user("normal-user@example.com", "Normal", "User", ["LMS Student"])
|
self.normal_user = self._create_user("normal-user@example.com", "Normal", "User", ["LMS Student"])
|
||||||
|
|
||||||
def test_allowed_path(self):
|
def test_allowed_path(self):
|
||||||
@@ -23,4 +23,4 @@ class TestAuth(FrappeAPITestCase, BaseTestUtils):
|
|||||||
frappe.session.user = "Administrator"
|
frappe.session.user = "Administrator"
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
BaseTestUtils.tearDown(self)
|
super().tearDown()
|
||||||
|
|||||||
Reference in New Issue
Block a user