diff --git a/Makefile b/Makefile index 3f06374ff..2f2e7b4de 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ define nox pip install --upgrade pip;\ pip install nox;\ };\ - nox $(1) -- '$(subst ",\",${noxconfig})';\ + nox $(1) -- '${noxconfig}';\ } endef diff --git a/tests/mocklib/keystoneclient/v3/tokens.py b/tests/mocklib/keystoneclient/v3/tokens.py index 9c641937e..46870bbb2 100644 --- a/tests/mocklib/keystoneclient/v3/tokens.py +++ b/tests/mocklib/keystoneclient/v3/tokens.py @@ -1,8 +1,9 @@ from unittest import mock -class TokenManager(mock.Mock): +class TokenManager: + validate = mock.Mock(name='validate') + validate.return_value = {'expires_at': '3022.07.04 00:00 CEST'} + def __init__(self, *argv, **kwarg): - super().__init__(*argv, **kwarg) - self.validate = mock.Mock(name='validate') - self.validate.return_value = {'expires_at': '3022.07.04 00:00 CEST'} + pass diff --git a/tests/test_linux/test_ipr/test_netns.py b/tests/test_linux/test_ipr/test_netns.py index ae81ebcd5..20f13473a 100644 --- a/tests/test_linux/test_ipr/test_netns.py +++ b/tests/test_linux/test_ipr/test_netns.py @@ -22,9 +22,9 @@ def test_get_netns_info(context): target = veth.get_attr('IFLA_LINK_NETNSID') for info in context.ipr.get_netns_info(): path = info.get_attr('NSINFO_PATH') - assert path.endswith(nsname) - netnsid = info['netnsid'] - if target == netnsid: - break + if path.endswith(nsname): + netnsid = info['netnsid'] + if target == netnsid: + break else: raise KeyError('peer netns not found')