Revised the BaseTestData class in testlib.py to add journal entries directly to the database instead of through the API, in order to allow the data to be reused, and to speed up the test.
This commit is contained in:
@@ -55,7 +55,7 @@ class ReportTestCase(unittest.TestCase):
|
||||
:return: None.
|
||||
"""
|
||||
client, csrf_token = get_client(self.app, "nobody")
|
||||
ReportTestData(self.app, self.client, self.csrf_token)
|
||||
ReportTestData(self.app, "editor")
|
||||
response: httpx.Response
|
||||
|
||||
response = client.get(PREFIX)
|
||||
@@ -130,7 +130,7 @@ class ReportTestCase(unittest.TestCase):
|
||||
:return: None.
|
||||
"""
|
||||
client, csrf_token = get_client(self.app, "viewer")
|
||||
ReportTestData(self.app, self.client, self.csrf_token)
|
||||
ReportTestData(self.app, "editor")
|
||||
response: httpx.Response
|
||||
|
||||
response = client.get(PREFIX)
|
||||
@@ -215,7 +215,7 @@ class ReportTestCase(unittest.TestCase):
|
||||
|
||||
:return: None.
|
||||
"""
|
||||
ReportTestData(self.app, self.client, self.csrf_token)
|
||||
ReportTestData(self.app, "editor")
|
||||
response: httpx.Response
|
||||
|
||||
response = self.client.get(PREFIX)
|
||||
|
||||
Reference in New Issue
Block a user