# Path: tenable_io/api/models.py
# class Permissions(BaseModel):
# 
#     class Scan:
#         # Scan Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_VIEW = 16
#         PERMISSION_CAN_CONTROL = 32
#         PERMISSION_CAN_CONFIGURE = 64
# 
#     class Policy:
#         # Policy Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_USE = 16
#         PERMISSION_CAN_EDIT = 32
# 
#     class Scanner:
#         # Scanner Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_USE = 16
#         PERMISSION_CAN_MANAGE = 32
# 
#     class Agent:
#         # Agent Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_USE = 16
# 
#     class TargetGroup:
#         # Target Group Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_VIEW = 32
#         PERMISSION_CAN_SCAN = 64
# 
#     class User:
#         # User Roles
#         PERMISSION_BASIC = 16
#         PERMISSION_SCAN_OPERATOR = 24
#         PERMISSION_STANDARD = 32
#         PERMISSION_SCAN_MANAGER = 40
#         PERMISSION_ADMINISTRATOR = 64
# 
#     class Type:
#         # Types of Permissible entity
#         DEFAULT = u'default'
#         USER = u'user'
#         GROUP = u'group'
# 
#     def __init__(
#             self,
#             owner=None,
#             type=None,
#             permissions=None,
#             id=None,
#             name=None,
#     ):
#         self.owner = owner
#         self.type = type
#         self.permissions = permissions
#         self.id = id
#         self.name = name


import pytest
from tenable_io.api.models import Permissions



@pytest.mark.vcr()
def test_permissions_helper_default_scan(client):
    default_view = client.permissions_helper.default_scan(Permissions.Scan.PERMISSION_CAN_VIEW)
    assert isinstance(default_view, Permissions)
    assert default_view.type == u'default'
    assert default_view.permissions == 16


# Path: tenable_io/api/models.py
# class Permissions(BaseModel):
# 
#     class Scan:
#         # Scan Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_VIEW = 16
#         PERMISSION_CAN_CONTROL = 32
#         PERMISSION_CAN_CONFIGURE = 64
# 
#     class Policy:
#         # Policy Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_USE = 16
#         PERMISSION_CAN_EDIT = 32
# 
#     class Scanner:
#         # Scanner Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_USE = 16
#         PERMISSION_CAN_MANAGE = 32
# 
#     class Agent:
#         # Agent Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_USE = 16
# 
#     class TargetGroup:
#         # Target Group Permissions
#         PERMISSION_NO_ACCESS = 0
#         PERMISSION_CAN_VIEW = 32
#         PERMISSION_CAN_SCAN = 64
# 
#     class User:
#         # User Roles
#         PERMISSION_BASIC = 16
#         PERMISSION_SCAN_OPERATOR = 24
#         PERMISSION_STANDARD = 32
#         PERMISSION_SCAN_MANAGER = 40
#         PERMISSION_ADMINISTRATOR = 64
# 
#     class Type:
#         # Types of Permissible entity
#         DEFAULT = u'default'
#         USER = u'user'
#         GROUP = u'group'
# 
#     def __init__(
#             self,
#             owner=None,
#             type=None,
#             permissions=None,
#             id=None,
#             name=None,
#     ):
#         self.owner = owner
#         self.type = type
#         self.permissions = permissions
#         self.id = id
#         self.name = name


# Path: tests/integration/helpers/test_permissions.py
import pytest
from tenable_io.api.models import Permissions




@pytest.mark.vcr()
def test_permissions_helper_default_scan(client):
    default_view = client.permissions_helper.default_scan(Permissions.Scan.PERMISSION_CAN_VIEW)
    assert isinstance(default_view, Permissions)
    assert default_view.type == u'default'
    assert default_view.permissions == 16


    default_control = client.permissions_helper.default_scan(Permissions.Scan.PERMISSION_CAN_CONTROL)