Skip to content

Commit 6f73024

Browse files
author
Inbal Tako
committed
Add version test
1 parent 5876c45 commit 6f73024

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

securenative/utils/version_utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@ class VersionUtils(object):
55

66
@staticmethod
77
def get_version():
8-
root_dir = os.path.dirname(os.path.abspath(__file__)).replace("/securenative/utils", "")
9-
path = os.path.join(root_dir, "VERSION")
10-
with open(path) as f:
11-
return f.read()
8+
return "0.2.3"

tests/version_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import unittest
2+
3+
from securenative.utils.version_utils import VersionUtils
4+
5+
6+
class VersionTest(unittest.TestCase):
7+
8+
def test_version(self):
9+
version = VersionUtils.get_version()
10+
11+
self.assertIsNotNone(version)

0 commit comments

Comments
 (0)