# Path: tenable_io/api/users.py
# class UserCreateRequest(BaseRequest):
# 
#     def __init__(
#             self,
#             username=None,
#             password=None,
#             permissions=None,
#             name=None,
#             email=None,
#             type=None
#     ):
#         self.username = username
#         self.password = password
#         self.permissions = permissions
#         self.name = name
#         self.email = email
#         self.type = type
# 
# Path: tests/config.py
# class TenableIOTestConfig(object):
# 
#     @staticmethod
#     def get(key):
#         return config.get('tenable_io-test', key)


import pytest
from tenable_io.api.users import UserCreateRequest
from tests.base import BaseTest
from tests.config import TenableIOTestConfig




class TestImpersonation(BaseTest):

    @pytest.mark.vcr()
    def test_impersonation(self, client):
        user_id = client.users_api.create(UserCreateRequest(
            username='test_impersonation@%s' % TenableIOTestConfig.get('users_domain_name'),
            name='test_impersonation',
            password='Sdk!Test1',
            permissions='16',
            type='local',

# Path: tenable_io/api/users.py
# class UserCreateRequest(BaseRequest):
# 
#     def __init__(
#             self,
#             username=None,
#             password=None,
#             permissions=None,
#             name=None,
#             email=None,
#             type=None
#     ):
#         self.username = username
#         self.password = password
#         self.permissions = permissions
#         self.name = name
#         self.email = email
#         self.type = type
# 
# Path: tests/config.py
# class TenableIOTestConfig(object):
# 
#     @staticmethod
#     def get(key):
#         return config.get('tenable_io-test', key)


# Path: tests/integration/client/test_impersonation.py
import pytest
from tenable_io.api.users import UserCreateRequest
from tests.base import BaseTest
from tests.config import TenableIOTestConfig





class TestImpersonation(BaseTest):

    @pytest.mark.vcr()
    def test_impersonation(self, client):
        user_id = client.users_api.create(UserCreateRequest(
            username='test_impersonation@%s' % TenableIOTestConfig.get('users_domain_name'),
            name='test_impersonation',
            password='Sdk!Test1',
            permissions='16',
            type='local',

            email='test_user_email@%s' % TenableIOTestConfig.get('users_domain_name')