We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29358dd commit 6587854Copy full SHA for 6587854
oca/tests/test_datastore_pool.py
@@ -0,0 +1,21 @@
1
+# -*- coding: UTF-8 -*-
2
+import os
3
+import unittest
4
+
5
+from mock import Mock
6
7
+import oca
8
9
10
+class TestDatastorePool(unittest.TestCase):
11
+ def setUp(self):
12
+ self.client = oca.Client('test:test')
13
+ self.xml = open(os.path.join(os.path.dirname(oca.__file__),
14
+ 'tests/fixtures/datastorepool.xml')).read()
15
16
+ def test_info(self):
17
+ self.client.call = Mock(return_value=self.xml)
18
+ pool = oca.DatastorePool(self.client)
19
+ pool.info()
20
+ assert len(list(pool)) == 2
21
0 commit comments