Skip to content

Commit

Permalink
Add other options too
Browse files Browse the repository at this point in the history
  • Loading branch information
saberlynx committed Nov 26, 2020
1 parent 65b530d commit 8c6f015
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gvm/protocols/gmpv7/gmpv7.py
Original file line number Diff line number Diff line change
Expand Up @@ -3447,6 +3447,8 @@ def get_nvt(self, nvt_oid: str):
# for single entity always request all details
cmd.set_attribute("details", "1")
cmd.set_attribute("preferences", "1")
cmd.set_attribute("preference_count", "1")
cmd.set_attribute("timeout", "1")
return self._send_xml_command(cmd)

def get_nvt_families(self, *, sort_order: Optional[str] = None):
Expand Down
5 changes: 4 additions & 1 deletion tests/protocols/gmpv7/testcmds/test_get_nvt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def test_get_nvt_with_nvt_oid(self):
self.gmp.get_nvt(nvt_oid='nvt_oid')

self.connection.send.has_been_called_with(
'<get_nvts nvt_oid="nvt_oid" details="1" preferences="1"/>'
(
'<get_nvts nvt_oid="nvt_oid" details="1" '
'preferences="1" preference_count="1" timeout="1"/>'
)
)

def test_get_nvt_missing_nvt_oid(self):
Expand Down

0 comments on commit 8c6f015

Please sign in to comment.