def test_get_tree_with_tree_samedir(self, isdir_mock, ceres_tree_mock): isdir_mock.return_value = True tree = getTree('/graphite/storage/ceres') self.assertNotEqual(None, tree) isdir_mock.assert_called_once_with( '/graphite/storage/ceres/.ceres-tree') ceres_tree_mock.assert_called_once_with('/graphite/storage/ceres')
def test_get_tree_with_tree_samedir(self, isdir_mock, ceres_tree_mock): isdir_mock.return_value = True tree = getTree('/graphite/storage/ceres') self.assertNotEqual(None, tree) isdir_mock.assert_called_once_with('/graphite/storage/ceres/.ceres-tree') ceres_tree_mock.assert_called_once_with('/graphite/storage/ceres')
def test_get_tree_with_no_tree(self): tree = getTree('/graphite/storage/ceres/foo/bar') self.assertEqual(None, tree)