Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
itdependsnetworks committed Feb 11, 2022
1 parent 3265f19 commit a9feffd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion napalm_panos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
# Import local modules
from napalm_panos.panos import PANOSDriver

__version__ = "0.5.3"
__version__ = "0.5.4"

__all__ = ("PANOSDriver",)
3 changes: 2 additions & 1 deletion napalm_panos/panos.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def load_replace_candidate(self, filename=None, config=None):

if self.device.status == "success":
self.loaded = True
raise ReplaceConfigException(f"Error while loading config from {path}")
else:
raise ReplaceConfigException(f"Error while loading config from {path}")

raise ReplaceConfigException("This method requires a config file.")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "napalm_panos"
version = "0.5.3"
version = "0.5.4"
description = "Network Automation and Programmability Abstraction Layer with Multivendor support for PANOS."
authors = ["Gabriele Gerbino <[email protected]>"]
license = "Apache-2.0"
Expand Down
17 changes: 17 additions & 0 deletions test/unit/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Basic test for version check."""
import os
import unittest

from napalm_panos import __version__ as project_version

import toml


class TestVersion(unittest.TestCase):
"""Test Version is the same."""

def test_version(self):
"""Verify that pyproject.toml version is same as version specified in the package."""
parent_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
poetry_version = toml.load(f"{parent_path}/pyproject.toml")["tool"]["poetry"]["version"]
self.assertEqual(project_version, poetry_version)

0 comments on commit a9feffd

Please sign in to comment.