2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

more class use

This commit is contained in:
Matthias Mair
2022-05-20 23:01:20 +02:00
parent 43f714b96c
commit e1ff4b6e87
7 changed files with 28 additions and 76 deletions

View File

@ -1,8 +1,8 @@
""" Unit tests for action plugins """
from django.test import TestCase
from django.contrib.auth import get_user_model
from InvenTree.InvenTree.helpers import InvenTreeTestCase
from plugin import InvenTreePlugin
from plugin.mixins import ActionMixin
@ -65,15 +65,9 @@ class ActionMixinTests(TestCase):
})
class APITests(TestCase):
class APITests(InvenTreeTestCase):
""" Tests for action api """
def setUp(self):
# Create a user for auth
user = get_user_model()
self.test_user = user.objects.create_user('testuser', 'test@testing.com', 'password')
self.client.login(username='testuser', password='password')
def test_post_errors(self):
"""Check the possible errors with post"""