def test_dye_node_without_color_with_invalid_color(self): """ Node without color shall not be dyed with invalid color.""" graphviz_node = 'pattern1 [label="Pattern 1", \ URL="../dir/of/sphinx-doc_file.html#pattern_1"];' color = "yellow" output = p3.dye_node(graphviz_node, color) expected_result = 'pattern1 [label="Pattern 1", \ URL="../dir/of/sphinx-doc_file.html#pattern_1"];' self.assertEqual(output, expected_result)
def test_dye_node_with_color_with_valid_color(self): """ Node with color shall not be overriden. """ graphviz_node = 'pattern1 [label="Pattern 1", \ URL="../dir/of/sphinx-doc_file.html#pattern_1", color = green];' color = "red" output = p3.dye_node(graphviz_node, color) expected_result = 'pattern1 [label="Pattern 1", \ URL="../dir/of/sphinx-doc_file.html#pattern_1", color = green];' self.assertEqual(output, expected_result)