Commit fd9657e8 authored by Carlos Natalino's avatar Carlos Natalino
Browse files

Testing one extra test

parent 47e4a51d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -125,8 +125,8 @@ def delete(device_uuid):
        response = device_client.DeleteDevice(request)
        device_client.close()

        flash('Device "{:s}" deleted successfully!'.format(device_uuid), 'success')
        flash(f'Device "{device_uuid}" deleted successfully!', 'success')
    except Exception as e:
        flash('Problem deleting device "{:s}": {:s}'.format(device_uuid, str(e.details())), 'danger')
        flash(f'Problem deleting device "{device_uuid}": {e.details()}', 'danger')
        current_app.logger.exception(e)
    return redirect(url_for('device.home'))
+5 −7
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ class TestWebUI(ClientTestCase):
        mock.patch.stopall()
        return super().tearDown(client)

    def test_routes(self, client):
    def test_routes(self, _) -> None:
        with self.app.app_context():
            url_for('main.home')
            url_for('service.home')
@@ -70,7 +70,7 @@ class TestWebUI(ClientTestCase):
            url_for('js.topology_js')
            url_for('js.site_js')

    def test_device_add_action_success(self, client):
    def test_device_add_action_success(self, client) -> None:
        with client.session_transaction() as sess:
            sess['context_uuid'] = 'admin'
        DEVICE_EMU = {
@@ -96,11 +96,9 @@ class TestWebUI(ClientTestCase):
    def test_service_up(self, client):
        pass



# def test_service_up(client):
#     rw = client.get('/')
#     assert rw.status_code == 200, 'Service is not up!'
    def test_service_up(client):
        rw = client.get('/')
        assert rw.status_code == 200, 'Service is not up!'

# def test_home_page(client):
#     rw = client.get('/')