chore: modify latest version msg (#3036)

Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>
This commit is contained in:
simone ragonesi
2023-11-14 12:11:55 +01:00
committed by GitHub
parent 690ec057c3
commit a36be258d8
2 changed files with 4 additions and 2 deletions

View File

@@ -70,7 +70,9 @@ def check_current_version():
if latest_version != prowler_version: if latest_version != prowler_version:
return f"{prowler_version_string} (latest is {latest_version}, upgrade for the latest features)" return f"{prowler_version_string} (latest is {latest_version}, upgrade for the latest features)"
else: else:
return f"{prowler_version_string} (it is the latest version, yay!)" return (
f"{prowler_version_string} (You are running the latest version, yay!)"
)
except requests.RequestException: except requests.RequestException:
return f"{prowler_version_string}" return f"{prowler_version_string}"
except Exception: except Exception:

View File

@@ -63,7 +63,7 @@ class Test_Config:
def test_check_current_version_with_latest(self): def test_check_current_version_with_latest(self):
assert ( assert (
check_current_version() check_current_version()
== f"Prowler {MOCK_PROWLER_VERSION} (it is the latest version, yay!)" == f"Prowler {MOCK_PROWLER_VERSION} (You are running the latest version, yay!)"
) )
@mock.patch( @mock.patch(