Ejemplo n.º 1
0
 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')
Ejemplo n.º 2
0
 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')
Ejemplo n.º 3
0
 def test_get_tree_with_no_tree(self):
     tree = getTree('/graphite/storage/ceres/foo/bar')
     self.assertEqual(None, tree)
Ejemplo n.º 4
0
 def test_get_tree_with_no_tree(self):
   tree = getTree('/graphite/storage/ceres/foo/bar')
   self.assertEqual(None, tree)