Skip to content

Commit

Permalink
test(settings): API Field Checks for External Links History
Browse files Browse the repository at this point in the history
ref: #605 #635
  • Loading branch information
jon-nfc committed Feb 17, 2025
1 parent 9b5781e commit 39e7ba2
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 164 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase

from core.tests.abstract.test_unit_model_history_api_v2 import PrimaryModelHistoryAPI

from settings.models.external_link_history import ExternalLink, ExternalLinkHistory



class ModelHistoryAPI(
PrimaryModelHistoryAPI,
TestCase,
):

audit_model = ExternalLink

model = ExternalLinkHistory

@classmethod
def setUpTestData(self):

super().setUpTestData()

self.audit_object = self.audit_model.objects.create(
organization = self.organization,
name = 'one',
)


self.history_entry = self.model.objects.create(
organization = self.audit_object.organization,
action = self.model.Actions.ADD,
user = self.view_user,
before = {},
after = {},
content_type = ContentType.objects.get(
app_label = self.audit_object._meta.app_label,
model = self.audit_object._meta.model_name,
),
model = self.audit_object,
)


self.make_request()

0 comments on commit 39e7ba2

Please sign in to comment.