Skip to content

Commit

Permalink
add test for vpp used license count exclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
almenscorner committed Feb 13, 2024
1 parent 8f11285 commit 3b8b7ca
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/Backup/Intune/test_backup_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@


import unittest
import json

from pathlib import Path
from unittest.mock import patch

Expand Down Expand Up @@ -105,6 +107,26 @@ def test_backup_macOS_vpp_app(self):
)
self.assertEqual(1, self.count["config_count"])

def test_backup_vpp_app_exclude_licensecout(self):
"""The folder should be created, the file should be created, and the count should be 1."""

self.app_base_data["value"][0]["@odata.type"] = "#microsoft.graph.iosVppApp"
self.app_base_data["value"][0]["usedLicenseCount"] = "1"

self.makeapirequest.return_value = self.app_base_data

self.exclude = ["VPPusedlicenseCount"]

self.count = savebackup(
self.directory.path, "json", self.exclude, self.token, self.append_id
)

app_data = json.load(
open(self.directory.path + "/Applications/iOS/test_iOSVppApp_test.json")
)

self.assertTrue(app_data.get("VPPusedlicenseCount") is None)

def test_backup_win32_lob_app_and_displayVersion(self):
"""The folder should be created, the file should be created, and the count should be 1."""

Expand Down

0 comments on commit 3b8b7ca

Please sign in to comment.