Code Duplication    Length = 16-16 lines in 2 locations

tests/protocols/gmpv8/testcmds/test_get_vulnerability.py 1 location

@@ 24-39 (lines=16) @@
21
from gvm.errors import RequiredArgument
22
23
24
class GmpGetVulnerabilityTestCase:
25
    def test_get_vulnerability(self):
26
        self.gmp.get_vulnerability('a1')
27
28
        self.connection.send.has_been_called_with('<get_vulns vuln_id="a1"/>')
29
30
        self.gmp.get_vulnerability(vulnerability_id='a1')
31
32
        self.connection.send.has_been_called_with('<get_vulns vuln_id="a1"/>')
33
34
    def test_get_vulnerability_invalid_vulnerability_id(self):
35
        with self.assertRaises(RequiredArgument):
36
            self.gmp.get_vulnerability(vulnerability_id=None)
37
38
        with self.assertRaises(RequiredArgument):
39
            self.gmp.get_vulnerability(vulnerability_id='')
40
41
42
if __name__ == '__main__':

tests/protocols/gmpv208/testcmds/test_get_vulnerability.py 1 location

@@ 24-39 (lines=16) @@
21
from gvm.errors import RequiredArgument
22
23
24
class GmpGetVulnerabilityTestCase:
25
    def test_get_vulnerability(self):
26
        self.gmp.get_vulnerability('a1')
27
28
        self.connection.send.has_been_called_with('<get_vulns vuln_id="a1"/>')
29
30
        self.gmp.get_vulnerability(vulnerability_id='a1')
31
32
        self.connection.send.has_been_called_with('<get_vulns vuln_id="a1"/>')
33
34
    def test_get_vulnerability_invalid_vulnerability_id(self):
35
        with self.assertRaises(RequiredArgument):
36
            self.gmp.get_vulnerability(vulnerability_id=None)
37
38
        with self.assertRaises(RequiredArgument):
39
            self.gmp.get_vulnerability(vulnerability_id='')
40
41
42
if __name__ == '__main__':