refactor(api): Update Test Suite for AuthToken model
ref: #871 closes #869 #735 #771
This commit is contained in:
@ -10,10 +10,10 @@ from api.serializers.auth_token import AuthToken, AuthTokenModelSerializer
|
||||
|
||||
from centurion.tests.abstract.mock_view import MockView, User
|
||||
|
||||
# from core.serializers.manufacturer import Manufacturer, ManufacturerModelSerializer
|
||||
|
||||
|
||||
|
||||
@pytest.mark.model_authtoken
|
||||
@pytest.mark.module_api
|
||||
class ValidationAPI(
|
||||
TestCase,
|
||||
):
|
||||
|
@ -1,4 +1,6 @@
|
||||
import django
|
||||
import pytest
|
||||
|
||||
from django.contrib.auth.models import Permission
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.shortcuts import reverse
|
||||
@ -28,7 +30,8 @@ User = django.contrib.auth.get_user_model()
|
||||
|
||||
|
||||
|
||||
|
||||
@pytest.mark.model_authtoken
|
||||
@pytest.mark.module_api
|
||||
class ViewSetBase:
|
||||
|
||||
model = AuthToken
|
||||
|
@ -1,6 +1,5 @@
|
||||
import django
|
||||
import pytest
|
||||
import unittest
|
||||
|
||||
from django.contrib.auth.models import Permission
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
@ -14,12 +13,12 @@ from access.models.team_user import TeamUsers
|
||||
from api.models.tokens import AuthToken
|
||||
from api.tests.abstract.api_fields import APIModelFields
|
||||
|
||||
from core.models.manufacturer import Manufacturer
|
||||
|
||||
User = django.contrib.auth.get_user_model()
|
||||
|
||||
|
||||
|
||||
@pytest.mark.model_authtoken
|
||||
@pytest.mark.module_api
|
||||
class API(
|
||||
TestCase,
|
||||
APIModelFields
|
||||
|
@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from django.test import Client, TestCase
|
||||
|
||||
from rest_framework.reverse import reverse
|
||||
@ -8,10 +10,10 @@ from api.tests.unit.test_unit_common_viewset import (
|
||||
)
|
||||
from api.viewsets.auth_token import ViewSet
|
||||
|
||||
# from settings.viewsets.user_settings import ViewSet
|
||||
|
||||
|
||||
|
||||
@pytest.mark.model_authtoken
|
||||
@pytest.mark.module_api
|
||||
class ViewsetList(
|
||||
ModelCreateViewSetInheritedCases,
|
||||
ModelListRetrieveDeleteViewSetInheritedCases,
|
||||
|
@ -17,6 +17,8 @@ User = django.contrib.auth.get_user_model()
|
||||
|
||||
|
||||
|
||||
@pytest.mark.model_authtoken
|
||||
@pytest.mark.module_api
|
||||
class APIAuthToken(TestCase):
|
||||
|
||||
|
||||
|
@ -1105,6 +1105,7 @@ markers = [
|
||||
"mixin_centurion: Selects all centurion mixin test cases.",
|
||||
"model_assetbase: Selects tests for model Asset Base.",
|
||||
"model_appsettings: Selects tests for model app settings.",
|
||||
"model_authtoken: Selects tests for model Auth Token.",
|
||||
"model_company: Selects test for model Company.",
|
||||
"model_configgroups: Selects Config Group tests.",
|
||||
"model_configgrouphosts: Selects Config Group Hosts tests.",
|
||||
|
Reference in New Issue
Block a user