Skip to content
Snippets Groups Projects
Commit d03ef507 authored by Nico's avatar Nico
Browse files

Fix various warning while running app and tests

parent b6b8b218
No related branches found
No related tags found
No related merge requests found
Pipeline #4008 passed with warnings
......@@ -7,4 +7,5 @@
disable=attribute-defined-outside-init,
duplicate-code,
fixme,
missing-docstring
missing-docstring,
wrong-import-position
[pycodestyle]
ignore = E126,E402
......@@ -13,8 +13,6 @@ import os
import signal
import sys
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gio
PACKAGE_DATA_DIR = '@PACKAGE_DATA_DIR@'
......
......@@ -6,6 +6,9 @@
# Initial version based on GNOME Lollypop
# https://gitlab.gnome.org/World/lollypop/blob/1.0.2/lollypop/application.py
import gi
gi.require_version('Gdk', '3.0')
gi.require_version('Gtk', '3.0')
from gi.repository import Gdk, Gio, GLib, Gtk
from briar_wrapper.api import Api
......
......@@ -4,6 +4,8 @@
from unittest.mock import Mock
import pytest
from briar_wrapper.api import Api
from briar.gtk.application import Application
from briar.gtk.define import APPLICATION_NAME, APPLICATION_STYLING_PATH
......@@ -137,3 +139,8 @@ def test_setup_window_has_none_attribute(mocker):
window_show_mock.assert_called_once()
window_present_mock.assert_called_once()
@pytest.fixture(autouse=True)
def glib_set_application_name(mocker):
mocker.patch("gi.repository.GLib.set_application_name")
......@@ -27,5 +27,5 @@ def auth_token():
def request_headers(auth_token):
request_headers = {
"Authorization": 'Bearer %s' % auth_token
}
}
return request_headers
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment