def test_get_api_keys(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for get_api_keys""" generate_method_test(ms_client, self.previous_auth_api_spec, "GET", "/auth/api_keys", rest_mocker, mock_request_from_schema=True, mock_response=AccessApiData.ApiKeysResponse)( access_api.get_api_keys)
def test_get_user_credentials(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for get_user_credentials""" generate_method_test( ms_client, ms_api_schema, "GET", "/user/credentials", rest_mocker, mock_request_from_schema=True, mock_response=UserApiData.CredsList, )(user_api.get_user_credentials)
def test_delete_backup(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for delete_backup""" generate_method_test( ms_client, ms_api_schema, "DELETE", "/backups", rest_mocker, mock_request_from_schema=True, mock_response_from_schema=True, )(backups_api.delete_backup)
def test_put_keyset(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for put_keyset""" generate_method_test( vns3_client, vns3_api_schema, "put", "/keyset", rest_mocker, mock_request_from_schema=True, mock_response=ConfigurationApiData.KeysetDetail, )(configuration_api.put_keyset)
def test_get_config(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for get_config""" generate_method_test( vns3_client, vns3_api_schema, "get", "/config", rest_mocker, mock_request_from_schema=True, mock_response=ConfigurationApiData.ConfigDetail, )(configuration_api.get_config)
def test_put_import_snapshot(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for put_import_snapshot""" generate_method_test( vns3_client, vns3_api_schema, "put", "/snapshots/running_config", rest_mocker, mock_request_from_schema=True, mock_response=SnapshotsApiData.SnapshotImportResponse, )(snapshots_api.put_import_snapshot)
def test_get_job_status(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for get_job_status""" generate_method_test( ms_client, ms_api_schema, "GET", "/system/jobs/{uuid}", rest_mocker, mock_request_from_schema=True, mock_response_from_schema=True, )(system_api.get_job_status)
def test_get_alerts(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for get_alerts""" generate_method_test( ms_client, ms_api_schema, "GET", "/alerts", rest_mocker, mock_request_from_schema=True, mock_response=CloudMonitoringApiData.AlertListResponse, )(cloud_monitoring_api.get_alerts)
def test_post_create_api_key(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for post_create_api_key""" generate_method_test(ms_client, self.previous_auth_api_spec, "POST", "/auth/api_key", rest_mocker, mock_request_from_schema=True, mock_response=AccessApiData.NewApiKeyResponse)( access_api.post_create_api_key)
def test_put_expire_token(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for put_expire_token""" generate_method_test(ms_client, self.previous_auth_api_spec, "PUT", "/auth/expire_token", rest_mocker, mock_request_from_schema=True, mock_response=AccessApiData.ExpireTokenResponse)( access_api.put_expire_token)
def test_put_invalidate_api_key_tokens(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for put_invalidate_api_key_tokens""" generate_method_test(ms_client, self.previous_auth_api_spec, "PUT", "/auth/invalidate_tokens", rest_mocker, mock_request_from_schema=True, mock_response=AccessApiData.ExpireKeyTokens)( access_api.put_invalidate_api_key_tokens)
def test_put_activate_api_key(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for put_activate_api_key""" generate_method_test(ms_client, self.previous_auth_api_spec, "PUT", "/auth/activate", rest_mocker, mock_request_from_schema=True, mock_response_from_schema=True)( access_api.put_activate_api_key)
def test_get_alerts(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for get_alerts""" generate_method_test( vns3_client, vns3_api_schema, "get", "/alerts", rest_mocker, mock_request_from_schema=True, mock_response=MonitoringApiData.AlertsListResponse, )(monitoring_alerting_api.get_alerts)
def test_delete_user_credential(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for delete_user_credential""" generate_method_test( ms_client, ms_api_schema, "DELETE", "/user/credentials/{credential_id}", rest_mocker, mock_request_from_schema=True, mock_response_from_schema=True, )(user_api.delete_user_credential)
def test_get_cloud_vlan(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for get_cloud_vlan""" generate_method_test( ms_client, ms_api_schema, "GET", "/cloud_vlans/{vlan_id}", rest_mocker, mock_request_from_schema=True, mock_response=CloudMonitoringApiData.CloudVlanDetail, )(cloud_monitoring_api.get_cloud_vlan)
def test_delete_snapshot(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for delete_snapshot""" generate_method_test( vns3_client, vns3_api_schema, "delete", "/snapshots/{snapshot_name}", rest_mocker, mock_request_from_schema=True, mock_response=SnapshotsApiData.SnapshotsListResponse, )(snapshots_api.delete_snapshot)
def test_delete_webhook(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for delete_webhook""" generate_method_test( ms_client, ms_api_schema, "DELETE", "/webhook/{webhook_id}", rest_mocker, mock_request_from_schema=True, mock_response=CloudMonitoringApiData.WebhookDetail, )(cloud_monitoring_api.delete_webhook)
def test_get_snapshots(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for get_snapshots""" generate_method_test( vns3_client, vns3_api_schema, "get", "/snapshots", rest_mocker, mock_request_from_schema=True, mock_response=SnapshotsApiData.SnapshotsListResponse, )(snapshots_api.get_snapshots)
def test_delete_alert(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for delete_alert""" generate_method_test( ms_client, ms_api_schema, "DELETE", "/alert/{alert_id}", rest_mocker, mock_request_from_schema=True, mock_response=CloudMonitoringApiData.AlertDetail, )(cloud_monitoring_api.delete_alert)
def test_get_backup_job(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for get_backup_job""" generate_method_test( ms_client, ms_api_schema, "GET", "/backups/create_backup/{uuid}", rest_mocker, mock_request_from_schema=True, mock_response=BackupsApiData.BackupJobStatusResponse, )(backups_api.get_backup_job)
def test_put_user_password(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for put_user_password""" generate_method_test( ms_client, ms_api_schema, "PUT", "/user/password", rest_mocker, mock_request_from_schema=True, mock_response_from_schema=True, )(user_api.put_user_password)
def test_get_container_logs(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for get_container_logs""" generate_method_test( vns3_client, vns3_api_schema, "get", "/container_system/containers/{uuid}/logs", rest_mocker, mock_request_from_schema=True, mock_response=NetworkEdgePluginsApiData.ContainerLogsResponse, )(network_edge_plugins_api.get_container_logs)
def test_get_connected_subnets(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for get_connected_subnets""" generate_method_test( vns3_client, vns3_api_schema, "get", "/status/connected_subnets", rest_mocker, mock_request_from_schema=True, mock_response={"response": [["10.0.1.0", "255.255.255.0"]]}, )(overlay_network_api.get_connected_subnets)
def test_get_clientpacks(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for get_clientpacks""" generate_method_test( vns3_client, vns3_api_schema, "get", "/clientpacks", rest_mocker, mock_request_from_schema=True, mock_response=OverlayNetworkApiData.ClientpacksListResponse, )(overlay_network_api.get_clientpacks)
def test_put_update_clientpack(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for put_update_clientpack""" generate_method_test( vns3_client, vns3_api_schema, "put", "/clientpack", rest_mocker, mock_request_from_schema=True, mock_response={"response": OverlayNetworkApiData.Clientpack}, )(overlay_network_api.put_update_clientpack)
def test_delete_clientpack_tag(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for delete_clientpack_tag""" generate_method_test( vns3_client, vns3_api_schema, "delete", "/clientpack/{clientpack_name}", rest_mocker, mock_request_from_schema=True, mock_response=OverlayNetworkApiData.ClientpackTagsResponse, )(overlay_network_api.delete_clientpack_tag)
def test_post_checkout_next_clientpack(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for post_checkout_next_clientpack""" generate_method_test( vns3_client, vns3_api_schema, "post", "/clientpacks/next_available", rest_mocker, mock_request_from_schema=True, mock_response=OverlayNetworkApiData.NextClientpackResponse, )(overlay_network_api.post_checkout_next_clientpack)
def test_put_reinitialize_subgroups(self, rest_mocker, vns3_client, vns3_api_schema: dict): """Test case for put_reinitialize_subgroups""" generate_method_test( vns3_client, vns3_api_schema, "put", "/firewall/rules/subgroup", rest_mocker, mock_request_from_schema=True, mock_response={}, )(firewall_api.put_reinitialize_subgroups)
def test_post_generate_remote_support_keypair(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for post_generate_remote_support_keypair""" generate_method_test( ms_client, ms_api_schema, "POST", "/system/remote_support/keypair", rest_mocker, mock_request_from_schema=True, mock_response_from_schema=True, )(system_api.post_generate_remote_support_keypair)
def test_get_remote_support_keypair_details(self, rest_mocker, ms_client, ms_api_schema: dict): """Test case for get_remote_support_keypair_details""" generate_method_test( ms_client, ms_api_schema, "GET", "/system/remote_support/keypair", rest_mocker, mock_request_from_schema=True, mock_response_from_schema=True, )(system_api.get_remote_support_keypair_details)