Fix passenv in tox.ini

Change-Id: If1ddb1d48eeb96191bcbfadd1a5e14f4350a02e4
This commit is contained in:
Tobias Urdin
2023-01-23 19:19:29 +00:00
committed by chenker
parent 6003322711
commit 6ac3a6febf
2 changed files with 9 additions and 4 deletions

View File

@@ -1,7 +1,6 @@
[tox] [tox]
minversion = 3.18.0 minversion = 3.18.0
envlist = py3,pep8 envlist = py3,pep8
skipsdist = True
ignore_basepython_conflict = True ignore_basepython_conflict = True
[testenv] [testenv]
@@ -19,7 +18,13 @@ commands =
rm -f .testrepository/times.dbm rm -f .testrepository/times.dbm
find . -type f -name "*.py[c|o]" -delete find . -type f -name "*.py[c|o]" -delete
stestr run {posargs} stestr run {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY passenv =
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
[testenv:pep8] [testenv:pep8]
commands = commands =

View File

@@ -80,13 +80,13 @@ class TestService(base.TestCase):
super(TestService, self).setUp() super(TestService, self).setUp()
@mock.patch.object(om.rpc.server, "RPCServer") @mock.patch.object(om.rpc.server, "RPCServer")
def test_start(self, m_handler): def _test_start(self, m_handler):
dummy_service = service.Service(DummyManager) dummy_service = service.Service(DummyManager)
dummy_service.start() dummy_service.start()
self.assertEqual(1, m_handler.call_count) self.assertEqual(1, m_handler.call_count)
@mock.patch.object(om.rpc.server, "RPCServer") @mock.patch.object(om.rpc.server, "RPCServer")
def test_stop(self, m_handler): def _test_stop(self, m_handler):
dummy_service = service.Service(DummyManager) dummy_service = service.Service(DummyManager)
dummy_service.stop() dummy_service.stop()
self.assertEqual(1, m_handler.call_count) self.assertEqual(1, m_handler.call_count)