This commit is contained in:
Peter Baumgartner 2014-01-29 14:45:06 -07:00
parent d7fa363673
commit f04a7d5056
2 changed files with 3 additions and 11 deletions

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
"""
uWSGI stats server http://uwsgi-docs.readthedocs.org/en/latest/StatsServer.html
@ -36,6 +37,6 @@ def stats(socket):
salt '*' uwsgi.stats 127.0.0.1:5050
"""
cmd = 'uwsgi --connect-and-read {}'.format(socket)
cmd = 'uwsgi --connect-and-read {0}'.format(socket)
out = __salt__['cmd.run'](cmd)
return json.loads(out)
return json.loads(out)

View File

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import urllib2
# Import Salt Testing libs
from salttesting import skipIf, TestCase
from salttesting.helpers import ensure_in_syspath
@ -12,14 +11,6 @@ ensure_in_syspath('../../')
uwsgi.__salt__ = {}
class MockUrllibStatus(object):
"""Mock of urllib2 call for Nginx status"""
def read(self):
return MOCK_STATUS_OUTPUT
def close(self):
pass
@skipIf(NO_MOCK, NO_MOCK_REASON)
@patch('salt.utils.which', Mock(return_value='/usr/bin/uwsgi'))
class UwsgiTestCase(TestCase):