import github3 from .helper import (UnitHelper, create_example_data_helper, create_url_helper) get_example_data = create_example_data_helper('tree_example') url_for = create_url_helper('https://api.github.com/repos/octocat/Hello-World/' 'trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312') reference_url_for = create_url_helper('https://api.github.com/repos/' 'octocat/Hello-World/' 'git/refs/heads/featureA') get_commit_example_data = create_example_data_helper('commit_example') get_git_tag_example_data = create_example_data_helper('git_tag_example') get_reference_example_data = create_example_data_helper('reference_example') class TestTree(UnitHelper): """Tree unit test""" described_class = github3.git.Tree example_data = get_example_data() def test_eq(self): """Assert that two trees are equal.""" tree = github3.git.Tree(get_example_data()) assert self.instance == tree def test_ne(self): """Assert that two trees are not equal.""" tree = github3.git.Tree(get_example_data()) tree._json_data['truncated'] = True assert self.instance != tree def test_repr(self): """Assert Tree in in the repr.""" assert isinstance(self.instance, github3.git.Tree) assert repr(self.instance).startswith('