Commit 05bb3519 authored by Łukasz Nowak's avatar Łukasz Nowak

Cover cyclic list scenario.

parent f062b3e6
...@@ -8465,6 +8465,17 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -8465,6 +8465,17 @@ class TestVifibSlapWebService(testVifibMixin):
graph = {'A': [], 'B': ['C'], 'C': ['A']} graph = {'A': [], 'B': ['C'], 'C': ['A']}
self.assertEqual(True, self.checkNotCyclic(graph)) self.assertEqual(True, self.checkNotCyclic(graph))
def test_si_tree_simple_list_cyclic(self):
"""Graph of cyclic list is cyclic
B->C->A-\
^-------/
"""
self._test_si_tree()
graph = {'A': ['B'], 'B': ['C'], 'C': ['A']}
from erp5.document.SoftwareInstance import CyclicSoftwareTree
self.assertRaises(CyclicSoftwareTree, self.checkNotCyclic, graph)
def test_si_tree_complex_not_cyclic(self): def test_si_tree_complex_not_cyclic(self):
"""Tree is not cyclic """Tree is not cyclic
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment