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