Fixed a few small issues.

This commit is contained in:
Timur Nurlygayanov 2013-04-04 18:36:57 +04:00
parent 9223f3b9a4
commit 9aece94eeb
8 changed files with 18 additions and 7 deletions

View File

@ -1,5 +1,5 @@
[tox]
envlist = py26,py27,pep8
envlist = py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}

View File

@ -55,7 +55,7 @@ class TaskResultHandlerService(service.Service):
def handle_report(msg):
log.debug(_('Got report message from orchestration engine:\n{0}'.
format(msg.body)))
format(msg.body)))
params = anyjson.deserialize(msg.body)
params['entity_id'] = params['id']

View File

@ -1,6 +1,7 @@
import unittest
import portas.api.v1 as api
class Test(unittest.TestCase):
def test(self):
assert True

View File

@ -3,14 +3,17 @@ from mock import MagicMock
import portas.api.v1.router as router
def my_mock(link, controller, action, conditions):
return [link, controller, action, conditions]
def func_mock():
return True
class SanityUnitTests(unittest2.TestCase):
def test_api(self):
router.webservers = MagicMock(create_resource=func_mock)
router.sessions = MagicMock(create_resource=func_mock)
@ -19,6 +22,5 @@ class SanityUnitTests(unittest2.TestCase):
mapper = MagicMock(connect=my_mock)
object = router.API(mapper)
assert object._router is not None

View File

@ -2,6 +2,7 @@
distribute>=0.6.24
# Needed for testing
unittest2
coverage
fixtures>=0.3.12
mox

View File

@ -1,5 +1,5 @@
[tox]
envlist = py26,py27,pep8
envlist = py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}

View File

@ -1,5 +1,5 @@
[tox]
envlist = py26,py27,pep8
envlist = py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}

View File

@ -0,0 +1,7 @@
xvfb
x11-xkb-utils
xfonts-100dpi
xfonts-75dpi
xfonts-scalable
xfonts-cyrillic
xserver-xorg-core