Skip to content

Commit 6587854

Browse files
mguezuragasysradium
authored andcommitted
Add missing datastore pool info test. Fixture was already present (python-oca#40)
1 parent 29358dd commit 6587854

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

oca/tests/test_datastore_pool.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)