def test_get_children_no_childrens(self): """No children from the given table""" # Setup childs = {} # Run data_navigator_mock = Mock() data_navigator_mock.child_map = childs result = DataNavigator.get_children(data_navigator_mock, 'DEMO') # Asserts expect = set() assert expect == result
def test_get_children(self): """get_children returns the relational children of a table.""" # Setup childs = {'DEMO': {'child_a': 'foo'}} # Run data_navigator_mock = Mock() data_navigator_mock.child_map = childs result = DataNavigator.get_children(data_navigator_mock, 'DEMO') # Asserts expect = {'child_a': 'foo'} assert expect == result