@ -1,63 +0,0 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from access.tests.functional.contact.test_functional_contact_history import (
|
||||
ContactHistoryInheritedCases
|
||||
)
|
||||
|
||||
from human_resources.models.employee import Employee
|
||||
|
||||
|
||||
|
||||
class EmployeeTestCases(
|
||||
ContactHistoryInheritedCases,
|
||||
):
|
||||
|
||||
field_name = 'model_notes'
|
||||
|
||||
kwargs_create_obj: dict = {
|
||||
'email': 'ipfunny@unit.test',
|
||||
'employee_number': 123456,
|
||||
}
|
||||
|
||||
kwargs_delete_obj: dict = {
|
||||
'email': 'ipweird@unit.test',
|
||||
'employee_number': 123457,
|
||||
}
|
||||
|
||||
model = Employee
|
||||
|
||||
|
||||
|
||||
class EmployeeHistoryInheritedCases(
|
||||
EmployeeTestCases,
|
||||
):
|
||||
|
||||
model = None
|
||||
"""Entity model to test"""
|
||||
|
||||
kwargs_create_obj: dict = None
|
||||
|
||||
kwargs_delete_obj: dict = None
|
||||
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(self):
|
||||
|
||||
self.kwargs_create_obj.update(
|
||||
super().kwargs_create_obj
|
||||
)
|
||||
|
||||
self.kwargs_delete_obj.update(
|
||||
super().kwargs_delete_obj
|
||||
)
|
||||
|
||||
super().setUpTestData()
|
||||
|
||||
|
||||
|
||||
class EmployeeHistoryTest(
|
||||
EmployeeTestCases,
|
||||
TestCase,
|
||||
):
|
||||
|
||||
pass
|
@ -1,58 +0,0 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from access.tests.unit.contact.test_unit_contact_history_api_v2 import (
|
||||
ContactHistoryAPIInheritedCases
|
||||
)
|
||||
|
||||
from human_resources.models.employee import Employee
|
||||
|
||||
|
||||
|
||||
class EmployeeModelHistoryAPITestCases(
|
||||
ContactHistoryAPIInheritedCases,
|
||||
):
|
||||
""" Model Histoy Test Cases
|
||||
|
||||
Test must be setup by creating object `kwargs_create_audit_object` with the
|
||||
attributes required to create the object.
|
||||
"""
|
||||
|
||||
audit_model = Employee
|
||||
|
||||
kwargs_create_audit_object: dict = {
|
||||
'email': 'ipfunny@unit.test',
|
||||
'employee_number': 123456,
|
||||
}
|
||||
|
||||
|
||||
|
||||
class EmployeeHistoryAPIInheritedCases(
|
||||
EmployeeModelHistoryAPITestCases,
|
||||
):
|
||||
"""Sub-Entity Test Cases
|
||||
|
||||
Test Cases for Entity models that inherit from model Contact
|
||||
"""
|
||||
|
||||
audit_model = None
|
||||
|
||||
kwargs_create_audit_object: dict = None
|
||||
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(self):
|
||||
|
||||
self.kwargs_create_audit_object.update(
|
||||
super().kwargs_create_audit_object
|
||||
)
|
||||
|
||||
super().setUpTestData()
|
||||
|
||||
|
||||
|
||||
class EmployeeModelHistoryAPITest(
|
||||
EmployeeModelHistoryAPITestCases,
|
||||
TestCase,
|
||||
):
|
||||
|
||||
pass
|
Reference in New Issue
Block a user