|
|
@@ -3,7 +3,6 @@ import datetime
|
|
|
from django.contrib.contenttypes.models import ContentType
|
|
|
from django.urls import reverse
|
|
|
from django.utils.timezone import make_aware, now
|
|
|
-from rest_framework import status
|
|
|
|
|
|
from core.choices import ManagedFileRootPathChoices
|
|
|
from core.events import *
|
|
|
@@ -921,22 +920,6 @@ class CreatedUpdatedFilterTest(APITestCase):
|
|
|
self.assertEqual(response.data['results'][0]['id'], rack2.pk)
|
|
|
|
|
|
|
|
|
-class ObjectTypeTest(APITestCase):
|
|
|
-
|
|
|
- def test_list_objects(self):
|
|
|
- object_type_count = ObjectType.objects.count()
|
|
|
-
|
|
|
- response = self.client.get(reverse('extras-api:objecttype-list'), **self.header)
|
|
|
- self.assertHttpStatus(response, status.HTTP_200_OK)
|
|
|
- self.assertEqual(response.data['count'], object_type_count)
|
|
|
-
|
|
|
- def test_get_object(self):
|
|
|
- object_type = ObjectType.objects.first()
|
|
|
-
|
|
|
- url = reverse('extras-api:objecttype-detail', kwargs={'pk': object_type.pk})
|
|
|
- self.assertHttpStatus(self.client.get(url, **self.header), status.HTTP_200_OK)
|
|
|
-
|
|
|
-
|
|
|
class SubscriptionTest(APIViewTestCases.APIViewTestCase):
|
|
|
model = Subscription
|
|
|
brief_fields = ['display', 'id', 'object_id', 'object_type', 'url', 'user']
|