From 35f1ba2d5c08e859988b1d6e5bb8bc33b986dffa Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Sat, 18 Jan 2025 15:10:59 +0000 Subject: [PATCH] feat: prepare to add all features to all fleets (#302) * feat: prepare to add all features to all fleets Dashboard is going EOL. Prepare to move * Update test_sbc.py * Update pyproject.toml --- hm_pyhelper/sbc.py | 9 +++++---- hm_pyhelper/tests/test_sbc.py | 2 +- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hm_pyhelper/sbc.py b/hm_pyhelper/sbc.py index f11acdc..556c13f 100644 --- a/hm_pyhelper/sbc.py +++ b/hm_pyhelper/sbc.py @@ -220,11 +220,12 @@ def is_commercial_fleet() -> bool: ''' Return true if the device is in a commercial fleet. Otherwise return false. ''' - fleet_name = os.environ.get('BALENA_APP_NAME') - fleet_id = int(os.environ.get('BALENA_APP_ID')) + # all fleets will get commercial software + # fleet_name = os.environ.get('BALENA_APP_NAME') + # fleet_id = int(os.environ.get('BALENA_APP_ID')) - if not fleet_name.endswith('-c') or fleet_id not in COMMERCIAL_FLEETS: - return False + # if not fleet_name.endswith('-c') or fleet_id not in COMMERCIAL_FLEETS: + # return False return True diff --git a/hm_pyhelper/tests/test_sbc.py b/hm_pyhelper/tests/test_sbc.py index 7726308..ce8f01f 100644 --- a/hm_pyhelper/tests/test_sbc.py +++ b/hm_pyhelper/tests/test_sbc.py @@ -24,4 +24,4 @@ def test_is_commercial_fleet_true(self): @patch.dict('os.environ', {"BALENA_APP_NAME": "test"}) @patch.dict('os.environ', {"BALENA_APP_ID": "8700"}) def test_is_commercial_fleet_false(self): - self.assertFalse(is_commercial_fleet()) + self.assertTrue(is_commercial_fleet()) diff --git a/pyproject.toml b/pyproject.toml index 4c355ce..8db88f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "hm_pyhelper" -version = "0.14.37" +version = "0.14.38" description = "Helium Python Helper" authors = ["Nebra Ltd "] readme = "README.md"