19
app/itam/tests/device/test_device_access_organization.py
Normal file
19
app/itam/tests/device/test_device_access_organization.py
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_create_has_organization():
|
||||
""" Devices must be assigned an organization """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_edit_has_organization():
|
||||
""" Devices must be assigned an organization """
|
||||
pass
|
87
app/itam/tests/device/test_device_core_history.py
Normal file
87
app/itam/tests/device/test_device_core_history.py
Normal file
@ -0,0 +1,87 @@
|
||||
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_auth_view():
|
||||
""" User requires Permission view_history """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_device_create():
|
||||
""" History row must be added to history table on create """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_device_update():
|
||||
""" History row must be added to history table on updatej """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_device_delete():
|
||||
""" History row must be added to history table on delete """
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_device_operating_system_create():
|
||||
""" History row must be added to history table on create
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_device_operating_system_update():
|
||||
""" History row must be added to history table on update
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_device_operating_system_delete():
|
||||
""" History row must be added to history table on delete
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_device_software_create():
|
||||
""" History row must be added to history table on create
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_device_software_update():
|
||||
""" History row must be added to history table on update
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_device_software_delete():
|
||||
""" History row must be added to history table on delete
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
58
app/itam/tests/device/test_device_core_notes.py
Normal file
58
app/itam/tests/device/test_device_core_notes.py
Normal file
@ -0,0 +1,58 @@
|
||||
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_device_no_blank_note():
|
||||
""" The field is set to blank=true, ensure that a blank note cant be saved
|
||||
|
||||
field had to be set blank=true so that other forms on same page could be saved.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_new_correct_device():
|
||||
""" On creation of device note the device must be added """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_view_device():
|
||||
""" Ensure that if the user doesn't have view permissions for notes, they can't see any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_add_device():
|
||||
""" Ensure that if the user doesn't have add permissions for notes, they can't add any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_edit_device():
|
||||
""" Ensure that if the user doesn't have edit permissions for notes, they can't edit any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_delete_device():
|
||||
""" Ensure that if the user doesn't have delete permissions for notes, they can't delete any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
32
app/itam/tests/device/test_device_permission.py
Normal file
32
app/itam/tests/device/test_device_permission.py
Normal file
@ -0,0 +1,32 @@
|
||||
# from django.conf import settings
|
||||
# from django.shortcuts import reverse
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_auth_view(user):
|
||||
""" Check correct permission for view """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_auth_add(user):
|
||||
""" Check correct permission for add """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_auth_change(user):
|
||||
""" Check correct permission for change """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_auth_delete(user):
|
||||
""" Check correct permission for delete """
|
||||
pass
|
32
app/itam/tests/device/test_device_permission_api.py
Normal file
32
app/itam/tests/device/test_device_permission_api.py
Normal file
@ -0,0 +1,32 @@
|
||||
# from django.conf import settings
|
||||
# from django.shortcuts import reverse
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_auth_view_api(user):
|
||||
""" Check correct permission for view """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_auth_add_api(user):
|
||||
""" Check correct permission for add """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_auth_change_api(user):
|
||||
""" Check correct permission for change """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_device_auth_delete_api(user):
|
||||
""" Check correct permission for delete """
|
||||
pass
|
@ -23,7 +23,7 @@ def test_operating_system_update_is_global_no_change(user):
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_prevent_delete_if_used(user):
|
||||
"""Any operating_system in use by a device must not be deleted.
|
||||
"""Any operating_system in use by a operating_system must not be deleted.
|
||||
|
||||
i.e. A global os can't be deleted
|
||||
"""
|
||||
@ -35,7 +35,7 @@ def test_operating_system_prevent_delete_if_used(user):
|
||||
def test_operating_system_version_installs_by_os_count(user):
|
||||
"""Operating System Versions has a count field that must be accurate
|
||||
|
||||
The count is of model OperatingSystemVersion linked to model DeviceOperatingSystem
|
||||
The count is of model OperatingSystemVersion linked to model operating_systemOperatingSystem
|
||||
"""
|
||||
|
||||
pass
|
@ -0,0 +1,19 @@
|
||||
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_create_has_organization():
|
||||
""" Operating Systems must be assigned an organization """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_edit_has_organization():
|
||||
""" Operating Systems must be assigned an organization """
|
||||
pass
|
@ -0,0 +1,52 @@
|
||||
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_operating_system_create():
|
||||
""" History row must be added to history table on create """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_operating_system_update():
|
||||
""" History row must be added to history table on updatej """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_operating_system_delete():
|
||||
""" History row must be added to history table on delete """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_operating_system_version_create():
|
||||
""" History row must be added to history table on create
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_operating_system_version_update():
|
||||
""" History row must be added to history table on update
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_operating_system_version_delete():
|
||||
""" History row must be added to history table on delete
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
@ -0,0 +1,51 @@
|
||||
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_new_correct_operating_system():
|
||||
""" On creation of operating system note the operating system must be added """
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_view_operating_system():
|
||||
""" Ensure that if the user doesn't have view permissions for notes, they can't see any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_add_operating_system():
|
||||
""" Ensure that if the user doesn't have add permissions for notes, they can't add any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_edit_operating_system():
|
||||
""" Ensure that if the user doesn't have edit permissions for notes, they can't edit any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_delete_operating_system():
|
||||
""" Ensure that if the user doesn't have delete permissions for notes, they can't delete any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
@ -0,0 +1,32 @@
|
||||
# from django.conf import settings
|
||||
# from django.shortcuts import reverse
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_auth_view(user):
|
||||
""" Check correct permission for view """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_auth_add(user):
|
||||
""" Check correct permission for add """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_auth_change(user):
|
||||
""" Check correct permission for change """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_auth_delete(user):
|
||||
""" Check correct permission for delete """
|
||||
pass
|
@ -0,0 +1,32 @@
|
||||
# from django.conf import settings
|
||||
# from django.shortcuts import reverse
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_auth_view_api(user):
|
||||
""" Check correct permission for view """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_auth_add_api(user):
|
||||
""" Check correct permission for add """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_auth_change_api(user):
|
||||
""" Check correct permission for change """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_operating_system_auth_delete_api(user):
|
||||
""" Check correct permission for delete """
|
||||
pass
|
@ -23,9 +23,9 @@ def test_software_update_is_global_no_change(user):
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_prevent_delete_if_used(user):
|
||||
"""Any software in use by a device must not be deleted.
|
||||
"""Any software in use by a software must not be deleted.
|
||||
|
||||
i.e. A device has an action set for the software.
|
||||
i.e. A software has an action set for the software.
|
||||
"""
|
||||
|
||||
pass
|
19
app/itam/tests/software/test_software_access_organization.py
Normal file
19
app/itam/tests/software/test_software_access_organization.py
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_create_has_organization():
|
||||
""" Software must be assigned an organization """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_edit_has_organization():
|
||||
""" Software must be assigned an organization """
|
||||
pass
|
52
app/itam/tests/software/test_software_core_history.py
Normal file
52
app/itam/tests/software/test_software_core_history.py
Normal file
@ -0,0 +1,52 @@
|
||||
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_software_create():
|
||||
""" History row must be added to history table on create """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_software_update():
|
||||
""" History row must be added to history table on updatej """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_software_delete():
|
||||
""" History row must be added to history table on delete """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_software_version_create():
|
||||
""" History row must be added to history table on create
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_software_version_update():
|
||||
""" History row must be added to history table on update
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_history_software_version_delete():
|
||||
""" History row must be added to history table on delete
|
||||
|
||||
Must also have populated parent_item_pk and parent_item_class columns
|
||||
"""
|
||||
pass
|
61
app/itam/tests/software/test_software_core_notes.py
Normal file
61
app/itam/tests/software/test_software_core_notes.py
Normal file
@ -0,0 +1,61 @@
|
||||
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_software_no_blank_note():
|
||||
""" The field is set to blank=true, ensure that a blank note cant be saved
|
||||
|
||||
field had to be set blank=true so that other forms on same page could be saved.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_new_correct_software():
|
||||
""" On creation of software note the software must be added """
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_view_software():
|
||||
""" Ensure that if the user doesn't have view permissions for notes, they can't see any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_add_software():
|
||||
""" Ensure that if the user doesn't have add permissions for notes, they can't add any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_edit_software():
|
||||
""" Ensure that if the user doesn't have edit permissions for notes, they can't edit any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_note_auth_delete_software():
|
||||
""" Ensure that if the user doesn't have delete permissions for notes, they can't delete any notes
|
||||
|
||||
user must also have view permissions for the opject the note is for
|
||||
"""
|
||||
pass
|
||||
|
32
app/itam/tests/software/test_software_permission.py
Normal file
32
app/itam/tests/software/test_software_permission.py
Normal file
@ -0,0 +1,32 @@
|
||||
# from django.conf import settings
|
||||
# from django.shortcuts import reverse
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_auth_view(user):
|
||||
""" Check correct permission for view """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_auth_add(user):
|
||||
""" Check correct permission for add """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_auth_change(user):
|
||||
""" Check correct permission for change """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_auth_delete(user):
|
||||
""" Check correct permission for delete """
|
||||
pass
|
32
app/itam/tests/software/test_software_permission_api.py
Normal file
32
app/itam/tests/software/test_software_permission_api.py
Normal file
@ -0,0 +1,32 @@
|
||||
# from django.conf import settings
|
||||
# from django.shortcuts import reverse
|
||||
from django.test import TestCase, Client
|
||||
|
||||
import pytest
|
||||
import unittest
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_auth_view_api(user):
|
||||
""" Check correct permission for view """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_auth_add_api(user):
|
||||
""" Check correct permission for add """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_auth_change_api(user):
|
||||
""" Check correct permission for change """
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="to be written")
|
||||
def test_software_auth_delete_api(user):
|
||||
""" Check correct permission for delete """
|
||||
pass
|
Reference in New Issue
Block a user