mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 07:42:08 -04:00
parsernode_test: testfix
This commit is contained in:
parent
6a5f013cfe
commit
958825c81f
5 changed files with 11 additions and 11 deletions
|
|
@ -368,7 +368,7 @@ class ApacheConfigurator(common.Installer):
|
|||
|
||||
return dualparser.DualBlockNode(
|
||||
name=assertions.PASS,
|
||||
ancestors=tuple(),
|
||||
ancestors=(),
|
||||
filepath=self.parser.loc["root"],
|
||||
metadata=metadata
|
||||
)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class AugeasParserNodeTest(util.ApacheTest): # pylint: disable=too-many-public-
|
|||
from certbot_apache.augeasparser import AugeasBlockNode
|
||||
block = AugeasBlockNode(
|
||||
name=assertions.PASS,
|
||||
ancestors=tuple(),
|
||||
ancestors=(),
|
||||
filepath=assertions.PASS,
|
||||
metadata={"augeasparser": mock.Mock(), "augeaspath": "/files/anything"}
|
||||
)
|
||||
|
|
@ -244,7 +244,7 @@ class AugeasParserNodeTest(util.ApacheTest): # pylint: disable=too-many-public-
|
|||
from certbot_apache.augeasparser import AugeasBlockNode
|
||||
parameters = {
|
||||
"name": assertions.PASS,
|
||||
"ancestors": tuple(),
|
||||
"ancestors": (),
|
||||
"filepath": assertions.PASS,
|
||||
"metadata": {
|
||||
"augeasparser": mock.Mock(),
|
||||
|
|
@ -261,7 +261,7 @@ class AugeasParserNodeTest(util.ApacheTest): # pylint: disable=too-many-public-
|
|||
from certbot_apache.augeasparser import AugeasBlockNode
|
||||
parameters = {
|
||||
"name": assertions.PASS,
|
||||
"ancestors": tuple(),
|
||||
"ancestors": (),
|
||||
"filepath": assertions.PASS,
|
||||
"metadata": {
|
||||
"augeasparser": mock.Mock(),
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class DualParserNodeTest(unittest.TestCase): # pylint: disable=too-many-public-
|
|||
parser_mock.get_arg.return_value = []
|
||||
self.metadata = {"augeasparser": parser_mock, "augeaspath": "/invalid", "ac_ast": None}
|
||||
self.block = dualparser.DualBlockNode(name="block",
|
||||
ancestors=tuple(),
|
||||
ancestors=(),
|
||||
filepath="/tmp/something",
|
||||
metadata=self.metadata)
|
||||
self.block_two = dualparser.DualBlockNode(name="block",
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ class DummyParserNode(interfaces.ParserNode):
|
|||
"""
|
||||
Initializes the ParserNode instance.
|
||||
"""
|
||||
ancestor, dirty, filepath, metadata = util.parsernode_kwargs(kwargs)
|
||||
self.ancestor = ancestor
|
||||
ancestors, dirty, filepath, metadata = util.parsernode_kwargs(kwargs)
|
||||
self.ancestors = ancestors
|
||||
self.dirty = dirty
|
||||
self.filepath = filepath
|
||||
self.metadata = metadata
|
||||
|
|
@ -108,18 +108,18 @@ class ParserNodeTest(unittest.TestCase):
|
|||
dummyblock = DummyBlockNode(
|
||||
name="None",
|
||||
parameters=(),
|
||||
ancestor=None,
|
||||
ancestors=(),
|
||||
dirty=False,
|
||||
filepath="/some/random/path"
|
||||
)
|
||||
dummydirective = DummyDirectiveNode(
|
||||
name="Name",
|
||||
ancestor=None,
|
||||
ancestors=(),
|
||||
filepath="/another/path"
|
||||
)
|
||||
dummycomment = DummyCommentNode(
|
||||
comment="Comment",
|
||||
ancestor=dummyblock,
|
||||
ancestors=(dummyblock,),
|
||||
filepath="/some/file"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class ParserNodeUtilTest(unittest.TestCase):
|
|||
def _setup_parsernode(self):
|
||||
""" Sets up kwargs dict for ParserNode """
|
||||
return {
|
||||
"ancestors": tuple(),
|
||||
"ancestors": (),
|
||||
"dirty": False,
|
||||
"filepath": "/tmp",
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue