[python-oca] create new repo
This commit is contained in:
commit
b202172a30
78 changed files with 4703 additions and 0 deletions
20
oca/tests/test_template_pool.py
Normal file
20
oca/tests/test_template_pool.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: UTF-8 -*-
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from mock import Mock
|
||||
|
||||
import oca
|
||||
|
||||
|
||||
class TestVmTemplatePool(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.client = oca.Client('test:test')
|
||||
self.xml = open(os.path.join(os.path.dirname(oca.__file__),
|
||||
'tests/fixtures/templatepool.xml')).read()
|
||||
|
||||
def test_info(self):
|
||||
self.client.call = Mock(return_value=self.xml)
|
||||
pool = oca.VmTemplatePool(self.client)
|
||||
pool.info()
|
||||
assert len(pool) == 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue