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