def test_user_list_route_inrow_delete(live_server, sl_admin, test_user): # pylint: disable=unused-argument """delete user inrow button""" sl_admin.get(url_for('auth.user_list_route', _external=True)) # in this test-case there are multiple items in the table (current_user, test_user), hence index which to delete has to be used dt_inrow_delete(sl_admin, 'user_list_table', 1) assert not User.query.get(test_user.id)
def test_service_list_route_inrow_delete(live_server, sl_operator, test_service): # pylint: disable=unused-argument """delete service inrow button""" sl_operator.get(url_for('storage.service_list_route', _external=True)) dt_inrow_delete(sl_operator, 'service_list_table') assert not Service.query.get(test_service.id)
def test_excl_list_route_inrow_delete(live_server, sl_operator, test_excl_network): # pylint: disable=unused-argument """delete excl inrow button""" sl_operator.get(url_for('scheduler.excl_list_route', _external=True)) dt_inrow_delete(sl_operator, 'excl_list_table') assert not Excl.query.get(test_excl_network.id)
def test_queue_list_route_inrow_delete(live_server, sl_operator, queue): # pylint: disable=unused-argument """delete queue inrow button""" queue_id = queue.id db.session.expunge(queue) sl_operator.get(url_for('scheduler.queue_list_route', _external=True)) dt_inrow_delete(sl_operator, 'queue_list_table') assert not Queue.query.get(queue_id)
def test_job_list_route_inrow_delete(live_server, sl_operator, job): # pylint: disable=unused-argument """delete job inrow button""" job_id = job.id db.session.expunge(job) sl_operator.get(url_for('scheduler.job_list_route', _external=True)) dt_inrow_delete(sl_operator, 'job_list_table') assert not Job.query.get(job_id)
def test_note_list_route_inrow_delete(live_server, sl_operator, note): # pylint: disable=unused-argument """delete note inrow button""" note_id = note.id db.session.expunge(note) sl_operator.get(url_for('storage.note_list_route', _external=True)) dt_inrow_delete(sl_operator, 'note_list_table') assert not Note.query.get(note_id)
def test_vuln_list_route_inrow_delete(live_server, sl_operator, vuln): # pylint: disable=unused-argument """delete vuln inrow button""" vuln_id = vuln.id db.session.expunge(vuln) sl_operator.get(url_for('storage.vuln_list_route', _external=True)) dt_inrow_delete(sl_operator, 'vuln_list_table') assert not Vuln.query.get(vuln_id)
def test_host_list_route_inrow_delete(live_server, sl_operator, host): # pylint: disable=unused-argument """delete host inrow button""" host_id = host.id db.session.expunge(host) sl_operator.get(url_for('storage.host_list_route', _external=True)) dt_inrow_delete(sl_operator, 'host_list_table') assert not Host.query.get(host_id)
def test_host_view_route_notes_list(live_server, sl_operator, test_note): # pylint: disable=unused-argument """host view tabbed notes dt test; render and inrow delete""" sl_operator.get( url_for('storage.host_view_route', host_id=test_note.host_id, _external=True)) switch_tab(sl_operator, 'notes', 'host_view_note_table', test_note.comment) dt_inrow_delete(sl_operator, 'host_view_note_table') assert not Note.query.get(test_note.id)
def test_host_view_route_vulns_list_inrow_delete(live_server, sl_operator, vuln): # pylint: disable=unused-argument """host view tabbed vulns dt test; render and inrow delete""" vuln_id = vuln.id db.session.expunge(vuln) sl_operator.get(url_for('storage.host_view_route', host_id=vuln.host_id, _external=True)) switch_tab(sl_operator, 'vulns', 'host_view_vuln_table', vuln.comment) dt_inrow_delete(sl_operator, 'host_view_vuln_table') assert not Vuln.query.get(vuln_id)
def test_host_view_route_services_list_inrow_delete(live_server, sl_operator, service): # pylint: disable=unused-argument """host view tabbed services dt tests; render and inrow delete""" service_id = service.id db.session.expunge(service) sl_operator.get(url_for('storage.host_view_route', host_id=service.host_id, _external=True)) switch_tab(sl_operator, 'services', 'host_view_service_table', service.comment) dt_inrow_delete(sl_operator, 'host_view_service_table') assert not Service.query.get(service_id)
def test_task_list_route_inrow_delete(live_server, sl_operator, test_task): # pylint: disable=unused-argument """delete task inrow button""" sl_operator.get(url_for('scheduler.task_list_route', _external=True)) dt_inrow_delete(sl_operator, 'task_list_table') assert not Task.query.get(test_task.id)