@ -42,6 +42,8 @@ class Contact(
|
||||
|
||||
documentation = ''
|
||||
|
||||
history_model_name = 'contact'
|
||||
|
||||
page_layout: list = [
|
||||
{
|
||||
"name": "Details",
|
||||
|
@ -65,6 +65,8 @@ class Person(
|
||||
|
||||
documentation = ''
|
||||
|
||||
history_model_name = 'person'
|
||||
|
||||
page_layout: dict = []
|
||||
|
||||
table_fields: list = [
|
||||
|
@ -130,7 +130,7 @@ class APITestCases(
|
||||
_urls.history field must use the endpoint for entity model
|
||||
"""
|
||||
|
||||
assert str(self.api_data['_urls']['history']).endswith('/access/entity/' + str(self.item.pk) + '/history')
|
||||
assert str(self.api_data['_urls']['history']).endswith('/' + str(self.item._meta.app_label) + '/' + str(self.item._meta.model_name) + '/' + str(self.item.pk) + '/history')
|
||||
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ class EntityModelTestCases(
|
||||
history_app_name is of type str
|
||||
"""
|
||||
|
||||
assert self.model.history_app_label == 'access'
|
||||
assert self.model.history_app_label == self.model._meta.app_label
|
||||
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ class EntityModelTestCases(
|
||||
history_model_name is of type str
|
||||
"""
|
||||
|
||||
assert self.model.history_model_name == 'entity'
|
||||
assert self.model.history_model_name == self.model._meta.model_name
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user