import os
import unittest
from pyats.topology import loader
from genie.libs.sdk.apis.iosxe.device_sensor.configure import configure_radius_server_vsa


class TestConfigureRadiusServerVsa(unittest.TestCase):

    @classmethod
    def setUpClass(self):
        testbed = f"""
        devices:
          9500H_SVL_W0607:
            connections:
              defaults:
                class: unicon.Unicon
              a:
                command: mock_device_cli --os iosxe --mock_data_dir {os.path.dirname(__file__)}/mock_data --state connect
                protocol: unknown
            os: iosxe
            platform: cat9k
            type: c9200
        """
        self.testbed = loader.load(testbed)
        self.device = self.testbed.devices['9500H_SVL_W0607']
        self.device.connect(
            learn_hostname=True,
            init_config_commands=[],
            init_exec_commands=[]
        )

    def test_configure_radius_server_vsa(self):
        result = configure_radius_server_vsa(self.device, 'send', 'accounting', None, 'nas-port', 'pppoa')
        expected_output = None
        self.assertEqual(result, expected_output)
