Code Duplication    Length = 20-20 lines in 2 locations

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

@@ 24-43 (lines=20) @@
21
from gvm.errors import RequiredArgument
22
23
24
class GmpGetNoteTestCase:
25
    def test_get_note(self):
26
        self.gmp.get_note('n1')
27
28
        self.connection.send.has_been_called_with(
29
            '<get_notes note_id="n1" details="1"/>'
30
        )
31
32
        self.gmp.get_note(note_id='n1')
33
34
        self.connection.send.has_been_called_with(
35
            '<get_notes note_id="n1" details="1"/>'
36
        )
37
38
    def test_get_note_missing_note_id(self):
39
        with self.assertRaises(RequiredArgument):
40
            self.gmp.get_note(note_id=None)
41
42
        with self.assertRaises(RequiredArgument):
43
            self.gmp.get_note('')
44
45
46
if __name__ == '__main__':

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

@@ 24-43 (lines=20) @@
21
from gvm.errors import RequiredArgument
22
23
24
class GmpGetNoteTestCase:
25
    def test_get_note(self):
26
        self.gmp.get_note('n1')
27
28
        self.connection.send.has_been_called_with(
29
            '<get_notes note_id="n1" details="1"/>'
30
        )
31
32
        self.gmp.get_note(note_id='n1')
33
34
        self.connection.send.has_been_called_with(
35
            '<get_notes note_id="n1" details="1"/>'
36
        )
37
38
    def test_get_note_missing_note_id(self):
39
        with self.assertRaises(RequiredArgument):
40
            self.gmp.get_note(note_id=None)
41
42
        with self.assertRaises(RequiredArgument):
43
            self.gmp.get_note('')
44
45
46
if __name__ == '__main__':