mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 15:22:38 -04:00
getargspec is deprecated in python 3
This commit is contained in:
parent
b0b8710835
commit
090a1bd44d
1 changed files with 7 additions and 2 deletions
|
|
@ -16,6 +16,11 @@ CHOICES = [("First", "Description1"), ("Second", "Description2")]
|
|||
TAGS = ["tag1", "tag2", "tag3"]
|
||||
TAGS_CHOICES = [("1", "tag1"), ("2", "tag2"), ("3", "tag3")]
|
||||
|
||||
if six.PY2:
|
||||
getargspec = inspect.getargspec
|
||||
else:
|
||||
getargspec = inspect.getfullargspec
|
||||
|
||||
|
||||
class InputWithTimeoutTest(unittest.TestCase):
|
||||
"""Tests for certbot.display.util.input_with_timeout."""
|
||||
|
|
@ -314,7 +319,7 @@ class FileOutputDisplayTest(unittest.TestCase):
|
|||
# Every IDisplay method implemented by FileDisplay must take
|
||||
# force_interactive to prevent workflow regressions.
|
||||
for name in interfaces.IDisplay.names(): # pylint: disable=no-member
|
||||
arg_spec = inspect.getargspec(getattr(self.displayer, name))
|
||||
arg_spec = getargspec(getattr(self.displayer, name))
|
||||
self.assertTrue("force_interactive" in arg_spec.args)
|
||||
|
||||
|
||||
|
|
@ -371,7 +376,7 @@ class NoninteractiveDisplayTest(unittest.TestCase):
|
|||
for name in interfaces.IDisplay.names(): # pylint: disable=no-member
|
||||
method = getattr(self.displayer, name)
|
||||
# asserts method accepts arbitrary keyword arguments
|
||||
self.assertFalse(inspect.getargspec(method).keywords is None)
|
||||
self.assertFalse(getargspec(method).keywords is None)
|
||||
|
||||
|
||||
class SeparateListInputTest(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Reference in a new issue