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

from 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')