def test_get_invited_by_tree_level_tree(self): tree = reward.get_invited_by_tree(self.data_tree, ['1', '3', '4']) self.assertEqual( tree, self.data_tree['1']['3']['4'] )
def test_get_invited_by_tree_should_return_none_if_no_tree(self): tree = reward.get_invited_by_tree(self.data_tree, ['1', '3', '5']) self.assertIsNone(tree)
def test_get_invited_by_tree_level_zero(self): tree = reward.get_invited_by_tree(self.data_tree, []) self.assertEqual( tree, self.data_tree )