Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 24-37 (lines=14) @@
21
from gvm.errors import GvmError
22
23
24
class GmpVerifyAgentTestCase:
25
    def test_verify(self):
26
        self.gmp.verify_agent('a1')
27
28
        self.connection.send.has_been_called_with(
29
            '<verify_agent agent_id="a1"/>'
30
        )
31
32
    def test_missing_id(self):
33
        with self.assertRaises(GvmError):
34
            self.gmp.verify_agent(None)
35
36
        with self.assertRaises(GvmError):
37
            self.gmp.verify_agent('')
38
39
40
if __name__ == '__main__':

tests/protocols/gmpv7/testcmds/test_verify_agent.py 1 location

@@ 24-37 (lines=14) @@
21
from gvm.errors import GvmError
22
23
24
class GmpVerifyAgentTestCase:
25
    def test_verify(self):
26
        self.gmp.verify_agent('a1')
27
28
        self.connection.send.has_been_called_with(
29
            '<verify_agent agent_id="a1"/>'
30
        )
31
32
    def test_missing_id(self):
33
        with self.assertRaises(GvmError):
34
            self.gmp.verify_agent(None)
35
36
        with self.assertRaises(GvmError):
37
            self.gmp.verify_agent('')
38
39
40
if __name__ == '__main__':