So, I would like to use the very handy setup method in order to make some test cases without repeating myself.
class RegisterViewTest(InertiaTestCase):
def setUp(self):
# Setup run before every test method.
self.test_user = User.objects.create_user(username='testuser', password='testpassword')
But unfortunately i get this error:
Traceback (most recent call last):
File "/home/pvpmartins/nutrify/myenv/lib/python3.11/site-packages/inertia/test.py", line 25, in tearDown
self.mock_inertia.stop()
^^^^^^^^^^^^^^^^^
AttributeError: 'RegisterViewTest' object has no attribute 'mock_inertia'
======================================================================
ERROR: test_register_and_login_pro_user (nutrifyapp.tests.RegisterViewTest.test_register_and_login_pro_user)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pvpmartins/nutrify/myenv/lib/python3.11/site-packages/inertia/test.py", line 25, in tearDown
self.mock_inertia.stop()
^^^^^^^^^^^^^^^^^
AttributeError: 'RegisterViewTest' object has no attribute 'mock_inertia'
So, I would like to use the very handy setup method in order to make some test cases without repeating myself.
But unfortunately i get this error: