summaryrefslogtreecommitdiffstats
path: root/tests/tree_test.py
blob: 888310652736d2f63e7851a739785e2693211ab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from unittest.mock import Mock

from src.g2h.tree import safe_join

def test_safe_join_empty():
    tree = Mock()
    assert(safe_join(tree, '') == tree)

def test_safe_join_non_empty():
    tree = Mock()
    safe_join(tree, 'test')
    tree.join.assert_called_with('test')