| @@ 24-35 (lines=12) @@ | ||
| 21 | from gvm.errors import GvmError |
|
| 22 | ||
| 23 | ||
| 24 | class GmpStartAuditTestCase: |
|
| 25 | def test_start_audit(self): |
|
| 26 | self.gmp.start_audit('a1') |
|
| 27 | ||
| 28 | self.connection.send.has_been_called_with('<start_task task_id="a1"/>') |
|
| 29 | ||
| 30 | def test_missing_id(self): |
|
| 31 | with self.assertRaises(GvmError): |
|
| 32 | self.gmp.start_audit(None) |
|
| 33 | ||
| 34 | with self.assertRaises(GvmError): |
|
| 35 | self.gmp.start_audit('') |
|
| 36 | ||
| 37 | ||
| 38 | if __name__ == '__main__': |
|
| @@ 24-35 (lines=12) @@ | ||
| 21 | from gvm.errors import GvmError |
|
| 22 | ||
| 23 | ||
| 24 | class GmpStartAuditTestCase: |
|
| 25 | def test_start_audit(self): |
|
| 26 | self.gmp.start_audit('a1') |
|
| 27 | ||
| 28 | self.connection.send.has_been_called_with('<start_task task_id="a1"/>') |
|
| 29 | ||
| 30 | def test_missing_id(self): |
|
| 31 | with self.assertRaises(GvmError): |
|
| 32 | self.gmp.start_audit(None) |
|
| 33 | ||
| 34 | with self.assertRaises(GvmError): |
|
| 35 | self.gmp.start_audit('') |
|
| 36 | ||
| 37 | ||
| 38 | if __name__ == '__main__': |
|