python-dbusmock 0.30.2__tar.gz → 0.31.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/.github/workflows/pages.yml +1 -1
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/.github/workflows/release.yml +3 -4
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/.github/workflows/tests.yml +1 -1
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/PKG-INFO +1 -1
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/_version.py +1 -1
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/logind.py +2 -2
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/networkmanager.py +8 -2
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/power_profiles_daemon.py +4 -4
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/pyproject.toml +1 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/python_dbusmock.egg-info/PKG-INFO +1 -1
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/run-debian +6 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/run-ubuntu +6 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_networkmanager.py +10 -3
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/.fmf/version +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/.github/release.eloquent.yml +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/.gitignore +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/.pre-commit-config.yaml +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/COPYING +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/NEWS +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/README.md +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/__init__.py +2 -2
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/__main__.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/mockobject.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/pytest_fixtures.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/SKELETON +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/__init__.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/bluez5-obex.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/bluez5.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/gnome_screensaver.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/iio-sensors-proxy.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/low_memory_monitor.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/notification_daemon.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/ofono.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/polkitd.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/systemd.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/timedated.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/upower.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/urfkill.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/testcase.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/doc/conf.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/doc/index.rst +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/packaging/python-dbusmock.spec +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/packit.yaml +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/plans/all.fmf +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/python_dbusmock.egg-info/SOURCES.txt +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/python_dbusmock.egg-info/dependency_links.txt +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/python_dbusmock.egg-info/requires.txt +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/python_dbusmock.egg-info/top_level.txt +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/setup.cfg +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/setup.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/__init__.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/conftest.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/main.fmf +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/run +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/run-centos +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/run-fedora +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_api.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_api_pytest.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_bluez5.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_cli.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_code.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_gnome_screensaver.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_iio_sensors_proxy.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_logind.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_low_memory_monitor.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_notification_daemon.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_ofono.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_polkitd.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_power_profiles_daemon.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_systemd.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_timedated.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_upower.py +0 -0
- {python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/tests/test_urfkill.py +0 -0
|
@@ -15,14 +15,13 @@ jobs:
|
|
|
15
15
|
contents: write
|
|
16
16
|
steps:
|
|
17
17
|
- name: Clone repository
|
|
18
|
-
uses: actions/checkout@
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
19
|
with:
|
|
20
20
|
# need this to also fetch tags
|
|
21
21
|
fetch-depth: 0
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
run: git config --global --add safe.directory /__w
|
|
23
|
+
- name: Workaround for https://github.com/actions/checkout/pull/697
|
|
24
|
+
run: git fetch --force origin $(git describe --tags):refs/tags/$(git describe --tags)
|
|
26
25
|
|
|
27
26
|
- name: Install dependencies
|
|
28
27
|
run: |
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'''auto-generated version from setuptools_scm'''
|
|
2
|
-
__version__ = "0.
|
|
2
|
+
__version__ = "0.31.0"
|
|
@@ -201,7 +201,7 @@ def AddUser(self, uid, username, active):
|
|
|
201
201
|
"Service": "",
|
|
202
202
|
"Sessions": dbus.Array([], signature="(so)"),
|
|
203
203
|
"Slice": f"user-{uid}.slice",
|
|
204
|
-
"State":
|
|
204
|
+
"State": "active" if active else "online",
|
|
205
205
|
"Timestamp": dbus.UInt64(42),
|
|
206
206
|
"TimestampMonotonic": dbus.UInt64(42),
|
|
207
207
|
"UID": dbus.UInt32(uid),
|
|
@@ -256,7 +256,7 @@ def AddSession(self, session_id, seat, uid, username, active):
|
|
|
256
256
|
"RemoteHost": "",
|
|
257
257
|
"RemoteUser": "",
|
|
258
258
|
"Service": "dbusmock",
|
|
259
|
-
"State":
|
|
259
|
+
"State": "active" if active else "online",
|
|
260
260
|
"TTY": "",
|
|
261
261
|
"Type": "test",
|
|
262
262
|
"Seat": (seat, seat_path),
|
|
@@ -503,7 +503,7 @@ def AddWiFiConnection(self, dev_path, connection_name, ssid_name, _key_mgmt):
|
|
|
503
503
|
|
|
504
504
|
The SSID must match one of the previously created access points.
|
|
505
505
|
|
|
506
|
-
Please note that this
|
|
506
|
+
Please note that this only sets minimal global properties in ipv{4,6}, no others.
|
|
507
507
|
|
|
508
508
|
Returns the new object path.
|
|
509
509
|
"""
|
|
@@ -558,6 +558,12 @@ def AddWiFiConnection(self, dev_path, connection_name, ssid_name, _key_mgmt):
|
|
|
558
558
|
"id": ssid_name,
|
|
559
559
|
"uuid": str(uuid.uuid4()),
|
|
560
560
|
},
|
|
561
|
+
"ipv4": {
|
|
562
|
+
"method": "auto",
|
|
563
|
+
},
|
|
564
|
+
"ipv6": {
|
|
565
|
+
"method": "auto",
|
|
566
|
+
},
|
|
561
567
|
}
|
|
562
568
|
|
|
563
569
|
if security != NM80211ApSecurityFlags.NM_802_11_AP_SEC_NONE:
|
|
@@ -810,7 +816,7 @@ def SettingsGetConnectionByUuid(self, conn_uuid):
|
|
|
810
816
|
settings = self.conn.GetSettings()
|
|
811
817
|
if settings["connection"]["uuid"] == conn_uuid:
|
|
812
818
|
return o
|
|
813
|
-
raise dbus.exceptions.DBusException(
|
|
819
|
+
raise dbus.exceptions.DBusException("No connection with the UUID was found.")
|
|
814
820
|
|
|
815
821
|
|
|
816
822
|
def ConnectionUpdate(self, settings):
|
{python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/dbusmock/templates/power_profiles_daemon.py
RENAMED
|
@@ -15,14 +15,14 @@ This provides only the non-deprecated D-Bus API as of version 0.9.
|
|
|
15
15
|
__author__ = "Bastien Nocera"
|
|
16
16
|
__copyright__ = """
|
|
17
17
|
(c) 2021, Red Hat Inc.
|
|
18
|
-
(c) 2017 -
|
|
18
|
+
(c) 2017 - 2024 Martin Pitt <martin@piware.de>
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
import dbus
|
|
22
22
|
|
|
23
|
-
BUS_NAME = "
|
|
24
|
-
MAIN_OBJ = "/
|
|
25
|
-
MAIN_IFACE = "
|
|
23
|
+
BUS_NAME = "org.freedesktop.UPower.PowerProfiles"
|
|
24
|
+
MAIN_OBJ = "/org/freedesktop/UPower/PowerProfiles"
|
|
25
|
+
MAIN_IFACE = "org.freedesktop.UPower.PowerProfiles"
|
|
26
26
|
SYSTEM_BUS = True
|
|
27
27
|
|
|
28
28
|
|
|
@@ -16,6 +16,12 @@ eatmydata apt-get install --no-install-recommends -y git \
|
|
|
16
16
|
python3-dbus python3-pytest python3-gi gir1.2-glib-2.0 \
|
|
17
17
|
dbus libnotify-bin upower network-manager bluez ofono ofono-scripts
|
|
18
18
|
|
|
19
|
+
# power-profiles-daemon 0.20 did not yet land in Ubuntu 24.04
|
|
20
|
+
. /etc/os-release
|
|
21
|
+
if [ "$ID" = "debian" ]; then
|
|
22
|
+
eatmydata apt-get install -y power-profiles-daemon
|
|
23
|
+
fi
|
|
24
|
+
|
|
19
25
|
# systemd's tools otherwise fail on "not been booted with systemd"
|
|
20
26
|
mkdir -p /run/systemd/system
|
|
21
27
|
|
|
@@ -16,6 +16,12 @@ eatmydata apt-get install --no-install-recommends -y git \
|
|
|
16
16
|
python3-dbus python3-pytest python3-gi gir1.2-glib-2.0 \
|
|
17
17
|
dbus libnotify-bin upower network-manager bluez ofono ofono-scripts
|
|
18
18
|
|
|
19
|
+
# power-profiles-daemon 0.20 did not yet land in Ubuntu 24.04
|
|
20
|
+
. /etc/os-release
|
|
21
|
+
if [ "$ID" = "debian" ]; then
|
|
22
|
+
eatmydata apt-get install -y power-profiles-daemon
|
|
23
|
+
fi
|
|
24
|
+
|
|
19
25
|
# systemd's tools otherwise fail on "not been booted with systemd"
|
|
20
26
|
mkdir -p /run/systemd/system
|
|
21
27
|
|
|
@@ -242,6 +242,14 @@ class TestNetworkManager(dbusmock.DBusTestCase):
|
|
|
242
242
|
self.assertEqual(ap1, "/org/freedesktop/NetworkManager/AccessPoint/Mock_AP1")
|
|
243
243
|
self.assertEqual(con1, "/org/freedesktop/NetworkManager/Settings/Mock_Con1")
|
|
244
244
|
|
|
245
|
+
settings = subprocess.check_output(
|
|
246
|
+
["nmcli", "--nocheck", "connection", "show", "The_SSID"], env=self.lang_env, universal_newlines=True
|
|
247
|
+
)
|
|
248
|
+
self.assertRegex(settings, r"ipv4.method:\s*auto")
|
|
249
|
+
self.assertRegex(settings, r"ipv4.gateway:\s*--")
|
|
250
|
+
self.assertRegex(settings, r"ipv6.method:\s*auto")
|
|
251
|
+
self.assertRegex(settings, r"ipv4.gateway:\s*--")
|
|
252
|
+
|
|
245
253
|
def test_global_state(self):
|
|
246
254
|
self.dbusmock.SetGlobalConnectionState(NMState.NM_STATE_CONNECTED_GLOBAL)
|
|
247
255
|
self.assertRegex(self.read_general(), r"connected.*\sfull")
|
|
@@ -585,9 +593,8 @@ class TestNetworkManager(dbusmock.DBusTestCase):
|
|
|
585
593
|
connectionPath = self.settings.AddConnection(settings)
|
|
586
594
|
self.assertEqual(self.settings.GetConnectionByUuid(uuid), connectionPath)
|
|
587
595
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
self.settings.GetConnectionByUuid(fakeuuid)
|
|
596
|
+
with self.assertRaisesRegex(dbus.exceptions.DBusException, "No connection with the UUID was found."):
|
|
597
|
+
self.settings.GetConnectionByUuid("123123123213213")
|
|
591
598
|
|
|
592
599
|
|
|
593
600
|
if __name__ == "__main__":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -25,12 +25,12 @@ except ImportError:
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
__all__ = [
|
|
28
|
-
"DBusMockObject",
|
|
29
28
|
"MOCK_IFACE",
|
|
30
29
|
"OBJECT_MANAGER_IFACE",
|
|
30
|
+
"BusType",
|
|
31
|
+
"DBusMockObject",
|
|
31
32
|
"DBusTestCase",
|
|
32
33
|
"PrivateDBus",
|
|
33
|
-
"BusType",
|
|
34
34
|
"SpawnedMock",
|
|
35
35
|
"get_object",
|
|
36
36
|
"get_objects",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-dbusmock-0.30.2 → python-dbusmock-0.31.0}/python_dbusmock.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|