tests/protocols/gmpv214/entities/scanners/test_create_scanner.py 1 location
|
@@ 120-136 (lines=17) @@
|
117 |
|
credential_id='c1', |
118 |
|
) |
119 |
|
|
120 |
|
def test_create_scanner_missing_credential_id(self): |
121 |
|
with self.assertRaises(RequiredArgument): |
122 |
|
self.gmp.create_scanner( |
123 |
|
name='foo', |
124 |
|
host='localhost', |
125 |
|
port=1234, |
126 |
|
scanner_type=ScannerType.OSP_SCANNER_TYPE, |
127 |
|
credential_id=None, |
128 |
|
) |
129 |
|
|
130 |
|
with self.assertRaises(RequiredArgument): |
131 |
|
self.gmp.create_scanner( |
132 |
|
name='foo', |
133 |
|
host='localhost', |
134 |
|
port=1234, |
135 |
|
scanner_type=ScannerType.OSP_SCANNER_TYPE, |
136 |
|
credential_id='', |
137 |
|
) |
138 |
|
|
139 |
|
def test_create_scanner_invalid_scanner_type(self): |
tests/protocols/gmpv208/entities/scanners/test_create_scanner.py 1 location
|
@@ 120-136 (lines=17) @@
|
117 |
|
credential_id='c1', |
118 |
|
) |
119 |
|
|
120 |
|
def test_create_scanner_missing_credential_id(self): |
121 |
|
with self.assertRaises(RequiredArgument): |
122 |
|
self.gmp.create_scanner( |
123 |
|
name='foo', |
124 |
|
host='localhost', |
125 |
|
port=1234, |
126 |
|
scanner_type=ScannerType.OSP_SCANNER_TYPE, |
127 |
|
credential_id=None, |
128 |
|
) |
129 |
|
|
130 |
|
with self.assertRaises(RequiredArgument): |
131 |
|
self.gmp.create_scanner( |
132 |
|
name='foo', |
133 |
|
host='localhost', |
134 |
|
port=1234, |
135 |
|
scanner_type=ScannerType.OSP_SCANNER_TYPE, |
136 |
|
credential_id='', |
137 |
|
) |
138 |
|
|
139 |
|
def test_create_scanner_invalid_scanner_type(self): |