summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijayakumar A <36878324+kumvijaya@users.noreply.github.com>2024-08-03 17:18:11 +0530
committerGitHub <noreply@github.com>2024-08-03 17:18:11 +0530
commit16e7418be7a815504991eba84707043f40a31c4c (patch)
tree905aceb9ddc9f033bd4d6b581eabdc863d6a378c
parent5cc6765b4e508eb0e16ae7f7de3d583a6cead6b6 (diff)
downloadvyos-workflow-test-temp-16e7418be7a815504991eba84707043f40a31c4c.tar.gz
vyos-workflow-test-temp-16e7418be7a815504991eba84707043f40a31c4c.zip
T0000: formatting issues
-rw-r--r--src/tests/test_config_diff.py6
-rw-r--r--src/tests/test_configverify.py1
-rw-r--r--src/tests/test_dependency_graph.py3
-rw-r--r--src/tests/test_dict_search.py11
4 files changed, 13 insertions, 8 deletions
diff --git a/src/tests/test_config_diff.py b/src/tests/test_config_diff.py
index 61a2f34..e2fa5c3 100644
--- a/src/tests/test_config_diff.py
+++ b/src/tests/test_config_diff.py
@@ -54,7 +54,7 @@ class TestConfigDiff(TestCase):
def test_identity(self):
lr_diff = vyos.configtree.DiffTree(self.config_left,
- self.config_right)
+ self.config_right)
sub = lr_diff.sub
inter = lr_diff.inter
@@ -64,6 +64,6 @@ class TestConfigDiff(TestCase):
l_union = vyos.configtree.union(sub, inter)
self.assertEqual(r_union.to_string(),
- self.config_right.to_string(ordered_values=True))
+ self.config_right.to_string(ordered_values=True))
self.assertEqual(l_union.to_string(),
- self.config_left.to_string(ordered_values=True))
+ self.config_left.to_string(ordered_values=True))
diff --git a/src/tests/test_configverify.py b/src/tests/test_configverify.py
index 15ccdf1..d82cb28 100644
--- a/src/tests/test_configverify.py
+++ b/src/tests/test_configverify.py
@@ -29,5 +29,6 @@ class TestDictSearch(TestCase):
def test_dh_key_512(self):
key_len = '512'
+
cmd(f'openssl dhparam -out {dh_file} {key_len}')
self.assertTrue(verify_diffie_hellman_length(dh_file, key_len))
diff --git a/src/tests/test_dependency_graph.py b/src/tests/test_dependency_graph.py
index f682e87..66dfc89 100644
--- a/src/tests/test_dependency_graph.py
+++ b/src/tests/test_dependency_graph.py
@@ -15,8 +15,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
+
from vyos.configdep import check_dependency_graph
+
_here = os.path.dirname(__file__)
ddir = os.path.join(_here, '../../data/config-mode-dependencies')
@@ -26,6 +28,7 @@ class TestDependencyGraph(TestCase):
def setUp(self):
pass
+
def test_acyclic(self):
res = check_dependency_graph(dependency_dir=ddir)
self.assertTrue(res)
diff --git a/src/tests/test_dict_search.py b/src/tests/test_dict_search.py
index 2435d89..216fa8a 100644
--- a/src/tests/test_dict_search.py
+++ b/src/tests/test_dict_search.py
@@ -20,6 +20,7 @@ from vyos.utils.dict import dict_search_recursive
data = {
'string': 'fooo',
+
'nested': {'string': 'bar', 'empty': '', 'list': ['foo', 'bar']},
'non': {},
'list': ['bar', 'baz'],
@@ -27,13 +28,13 @@ data = {
'interfaces': {'dummy': {'dum0': {'address': ['192.0.2.17/29']}},
'ethernet': {'eth0': {'address': ['2001:db8::1/64', '192.0.2.1/29'],
'description': 'Test123',
- 'duplex': 'auto',
+ 'duplex': 'auto',
'hw_id': '00:00:00:00:00:01',
'speed': 'auto'},
'eth1': {'address': ['192.0.2.9/29'],
'description': 'Test456',
'duplex': 'auto',
- 'hw_id': '00:00:00:00:00:02',
+ 'hw_id': '00:00:00:00:00:02',
'speed': 'auto'}}}
}
@@ -43,12 +44,12 @@ class TestDictSearch(TestCase):
def test_non_existing_keys(self):
# TestDictSearch: Return False when querying for non-existent key
- self.assertEqual(dict_search('non_existing', data), None)
- self.assertEqual(dict_search('non.existing.fancy.key', data), None)
+ self.assertEqual(dict_search('non_existing', data), None)
+ self.assertEqual(dict_search('non.existing.fancy.key', data), None)
def test_string(self):
# TestDictSearch: Return value when querying string
- self.assertEqual(dict_search('string', data), data['string'])
+ self.assertEqual(dict_search('string', data), data['string'])
def test_list(self):
# TestDictSearch: Return list items when querying list