-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ncf helpers #62
Add ncf helpers #62
Conversation
@@ -220,3 +221,63 @@ def get_all_techniques_metadata(include_methods_calls = True, alt_path = ''): | |||
|
|||
return all_metadata | |||
|
|||
def delete_technique_file(technique_name, alt_path=""): | |||
"""Delete a technique directory contained in a path""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming/comments aren't making a whole lot of sense here: delete_file vs "Delete ... directory".
Let's just call this method "delete_technique", and avoid any references to files/directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
all done! Thanks Jon! |
raise NcfError(message) | ||
|
||
def get_technique_content(technique_metadata): | ||
"""Get technique CFEngine file as string from its metadata""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Get/Build or Generate/
updated again! |
assert result | ||
|
||
def test_default_technique_content(self): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is mandatory in the Python unit testing framework we use to have a """string""" at the beginning of each test function. Either way, it is good practice to describe what the test does here.
No description provided.