def test_objects_arguments(patch, tree): patch.object(Objects, 'argument') tree.find_data.return_value = ['argument'] result = Objects().arguments(tree) tree.find_data.assert_called_with('arguments') Objects.argument.assert_called_with('argument') assert result == [Objects.argument()]
def test_objects_arguments(patch, tree): patch.object(Objects, "argument") tree.find_data.return_value = ["argument"] result = Objects().arguments(tree) tree.find_data.assert_called_with("arguments") Objects.argument.assert_called_with("argument") assert result == [Objects.argument()]