def test_del_machine(self): switch.add_switch_machine( 1, mac='28:6e:d4:46:c4:25', port='1', user=self.user_object, ) machine.del_machine( 1, user=self.user_object, ) del_machine = machine.list_machines(self.user_object) self.assertEqual([], del_machine)
def delete_machine(machine_id): """Delete machine.""" data = _get_request_data() return utils.make_json_response( 200, machine_api.del_machine( current_user, machine_id, **data ) )