Handle old psutil in TestProcess
This commit is contained in:
parent
d8cf148d4a
commit
ef849d2dd3
|
@ -195,6 +195,7 @@ class TestProcess(TestProcessProto):
|
||||||
"""Check PyBitmessage process name"""
|
"""Check PyBitmessage process name"""
|
||||||
self.assertEqual(self.process.name(), 'PyBitmessage')
|
self.assertEqual(self.process.name(), 'PyBitmessage')
|
||||||
|
|
||||||
|
@unittest.skipIf(psutil.version_info < (4, 0), 'psutil is too old')
|
||||||
def test_home(self):
|
def test_home(self):
|
||||||
"""Ensure BITMESSAGE_HOME is used by process"""
|
"""Ensure BITMESSAGE_HOME is used by process"""
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
|
@ -204,7 +205,7 @@ class TestProcess(TestProcessProto):
|
||||||
"""Check that pybitmessage listens on port 8444"""
|
"""Check that pybitmessage listens on port 8444"""
|
||||||
for c in self.process.connections():
|
for c in self.process.connections():
|
||||||
if c.status == 'LISTEN':
|
if c.status == 'LISTEN':
|
||||||
self.assertEqual(c.laddr.port, 8444)
|
self.assertEqual(c.laddr[1], 8444)
|
||||||
break
|
break
|
||||||
|
|
||||||
def test_files(self):
|
def test_files(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user