python-dbusmock 0.34.2__tar.gz → 0.35.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.
Files changed (79) hide show
  1. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/.github/workflows/pages.yml +19 -15
  2. {python_dbusmock-0.34.2/python_dbusmock.egg-info → python_dbusmock-0.35.0}/PKG-INFO +4 -2
  3. python_dbusmock-0.35.0/dbusmock/_version.py +1 -0
  4. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/modemmanager.py +14 -0
  5. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/doc/conf.py +1 -1
  6. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/packit.yaml +5 -3
  7. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0/python_dbusmock.egg-info}/PKG-INFO +4 -2
  8. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/run-centos +1 -1
  9. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/run-debian +1 -2
  10. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/run-fedora +1 -1
  11. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/run-ubuntu +1 -2
  12. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_modemmanager.py +1 -0
  13. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_notification_daemon.py +5 -9
  14. python_dbusmock-0.34.2/dbusmock/_version.py +0 -1
  15. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/.fmf/version +0 -0
  16. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/.github/release.eloquent.yml +0 -0
  17. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/.github/workflows/release.yml +0 -0
  18. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/.github/workflows/tests.yml +0 -0
  19. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/.gitignore +0 -0
  20. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/.pre-commit-config.yaml +0 -0
  21. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/COPYING +0 -0
  22. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/NEWS +0 -0
  23. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/README.md +0 -0
  24. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/__init__.py +0 -0
  25. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/__main__.py +0 -0
  26. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/mockobject.py +0 -0
  27. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/pytest_fixtures.py +0 -0
  28. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/SKELETON +0 -0
  29. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/__init__.py +0 -0
  30. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/bluez5-obex.py +0 -0
  31. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/bluez5.py +0 -0
  32. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/gnome_screensaver.py +0 -0
  33. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/gsd_rfkill.py +0 -0
  34. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/iio-sensors-proxy.py +0 -0
  35. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/logind.py +0 -0
  36. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/low_memory_monitor.py +0 -0
  37. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/networkmanager.py +0 -0
  38. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/notification_daemon.py +0 -0
  39. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/ofono.py +0 -0
  40. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/polkitd.py +0 -0
  41. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/power_profiles_daemon.py +0 -0
  42. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/systemd.py +0 -0
  43. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/timedated.py +0 -0
  44. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/upower.py +0 -0
  45. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/upower_power_profiles_daemon.py +0 -0
  46. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/templates/urfkill.py +0 -0
  47. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/dbusmock/testcase.py +0 -0
  48. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/doc/index.rst +0 -0
  49. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/packaging/python-dbusmock.spec +0 -0
  50. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/plans/all.fmf +0 -0
  51. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/pyproject.toml +0 -0
  52. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/python_dbusmock.egg-info/SOURCES.txt +0 -0
  53. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/python_dbusmock.egg-info/dependency_links.txt +0 -0
  54. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/python_dbusmock.egg-info/requires.txt +0 -0
  55. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/python_dbusmock.egg-info/top_level.txt +0 -0
  56. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/setup.cfg +0 -0
  57. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/setup.py +0 -0
  58. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/__init__.py +0 -0
  59. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/conftest.py +0 -0
  60. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/main.fmf +0 -0
  61. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/run +0 -0
  62. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_api.py +0 -0
  63. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_api_pytest.py +0 -0
  64. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_bluez5.py +1 -1
  65. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_cli.py +0 -0
  66. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_code.py +0 -0
  67. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_gnome_screensaver.py +0 -0
  68. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_gsd_rfkill.py +0 -0
  69. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_iio_sensors_proxy.py +0 -0
  70. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_logind.py +0 -0
  71. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_low_memory_monitor.py +0 -0
  72. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_networkmanager.py +1 -1
  73. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_ofono.py +0 -0
  74. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_polkitd.py +0 -0
  75. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_power_profiles_daemon.py +0 -0
  76. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_systemd.py +0 -0
  77. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_timedated.py +0 -0
  78. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_upower.py +0 -0
  79. {python_dbusmock-0.34.2 → python_dbusmock-0.35.0}/tests/test_urfkill.py +0 -0
@@ -7,22 +7,16 @@ on:
7
7
  # Allow running this workflow manually from the Actions tab
8
8
  workflow_dispatch:
9
9
 
10
- permissions:
11
- contents: read
12
- pages: write
13
- id-token: write
14
-
15
10
  # Allow only one concurrent deployment
16
11
  concurrency:
17
12
  group: "pages"
18
13
  cancel-in-progress: false
19
14
 
20
15
  jobs:
21
- deploy:
22
- runs-on: ubuntu-22.04
23
- environment:
24
- name: github-pages
25
- url: ${{ steps.deployment.outputs.page_url }}
16
+ build:
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: read
26
20
 
27
21
  steps:
28
22
  - uses: actions/checkout@v4
@@ -39,14 +33,24 @@ jobs:
39
33
  - name: Move output to target directory
40
34
  run: mv doc/html public_html/
41
35
 
42
- - name: Setup Pages
43
- uses: actions/configure-pages@v3
44
-
45
36
  - name: Upload pages artifact
46
- uses: actions/upload-pages-artifact@v1
37
+ id: deployment
38
+ uses: actions/upload-pages-artifact@v3
47
39
  with:
48
40
  path: public_html/
49
41
 
42
+ deploy:
43
+ needs: build
44
+ runs-on: ubuntu-latest
45
+ permissions:
46
+ contents: read
47
+ pages: write
48
+ id-token: write
49
+ environment:
50
+ name: github-pages
51
+ url: ${{ steps.deployment.outputs.page_url }}
52
+
53
+ steps:
50
54
  - name: Deploy to GitHub Pages
51
55
  id: deployment
52
- uses: actions/deploy-pages@v2
56
+ uses: actions/deploy-pages@v4
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: python-dbusmock
3
- Version: 0.34.2
3
+ Version: 0.35.0
4
4
  Summary: Mock D-Bus objects
5
5
  Home-page: https://github.com/martinpitt/python-dbusmock
6
6
  Download-URL: https://pypi.python.org/pypi/python-dbusmock/
@@ -188,6 +188,8 @@ Requires-Python: >=3.8
188
188
  Description-Content-Type: text/markdown
189
189
  License-File: COPYING
190
190
  Requires-Dist: dbus-python
191
+ Dynamic: download-url
192
+ Dynamic: license-file
191
193
 
192
194
  ![CI status](https://github.com/martinpitt/python-dbusmock/actions/workflows/tests.yml/badge.svg)
193
195
 
@@ -0,0 +1 @@
1
+ __version__ = "0.35.0"
@@ -151,6 +151,17 @@ def deleteCbm(self, cbm_path):
151
151
  )
152
152
 
153
153
 
154
+ def setChannels(_self, channels):
155
+ modem_obj = mockobject.objects[SIMPLE_MODEM_PATH]
156
+
157
+ modem_obj.UpdateProperties(
158
+ MODEM_CELL_BROADCAST_IFACE,
159
+ {
160
+ "Channels": dbus.Array(channels),
161
+ },
162
+ )
163
+
164
+
154
165
  @dbus.service.method(MOCK_IFACE, in_signature="", out_signature="ss")
155
166
  def AddSimpleModem(self):
156
167
  """Convenience method to add a simple Modem object
@@ -189,17 +200,20 @@ def AddSimpleModem(self):
189
200
  modem_3gpp_props = {
190
201
  "Imei": dbus.String("doesnotmatter"),
191
202
  "OperatorName": dbus.String("TheOperator"),
203
+ "OperatorCode": dbus.String("00101"),
192
204
  "Pco": dbus.Array([], signature="(ubay)"),
193
205
  }
194
206
  modem = mockobject.objects[modem_path]
195
207
  modem.AddProperties(MODEM_3GPP_IFACE, modem_3gpp_props)
196
208
 
197
209
  modem_cell_broadcast_props = {
210
+ "Channels": dbus.Array([], signature="(uu)"),
198
211
  "CellBroadcasts": dbus.Array([], signature="o"),
199
212
  }
200
213
  modem_cell_broadcast_methods = [
201
214
  ("List", "", "ao", listCbm),
202
215
  ("Delete", "o", "", deleteCbm),
216
+ ("SetChannels", "a(uu)", "", setChannels),
203
217
  ]
204
218
  modem.AddProperties(MODEM_CELL_BROADCAST_IFACE, modem_cell_broadcast_props)
205
219
  modem.AddMethods(MODEM_CELL_BROADCAST_IFACE, modem_cell_broadcast_methods)
@@ -7,7 +7,7 @@
7
7
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
8
 
9
9
  project = "python-dbusmock"
10
- copyright = "2023, Martin Pitt" # noqa: A001
10
+ copyright = "2023 - 2025, Martin Pitt" # noqa: A001
11
11
  author = "Martin Pitt"
12
12
 
13
13
  try:
@@ -23,9 +23,11 @@ jobs:
23
23
  - job: copr_build
24
24
  trigger: pull_request
25
25
  targets:
26
- - fedora-all
27
- - centos-stream-9-x86_64
28
- - centos-stream-10-x86_64
26
+ - fedora-latest-i386
27
+ - fedora-latest-aarch64
28
+ - fedora-latest-ppc64le
29
+ - fedora-latest-s390x
30
+ - fedora-latest-armhfp
29
31
 
30
32
  - job: tests
31
33
  trigger: pull_request
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: python-dbusmock
3
- Version: 0.34.2
3
+ Version: 0.35.0
4
4
  Summary: Mock D-Bus objects
5
5
  Home-page: https://github.com/martinpitt/python-dbusmock
6
6
  Download-URL: https://pypi.python.org/pypi/python-dbusmock/
@@ -188,6 +188,8 @@ Requires-Python: >=3.8
188
188
  Description-Content-Type: text/markdown
189
189
  License-File: COPYING
190
190
  Requires-Dist: dbus-python
191
+ Dynamic: download-url
192
+ Dynamic: license-file
191
193
 
192
194
  ![CI status](https://github.com/martinpitt/python-dbusmock/actions/workflows/tests.yml/badge.svg)
193
195
 
@@ -3,7 +3,7 @@ set -eux
3
3
  # install build dependencies
4
4
  dnf -y install python3-setuptools python3 python3-gobject-base \
5
5
  python3-dbus dbus-x11 util-linux \
6
- upower NetworkManager bluez libnotify polkit
6
+ upower NetworkManager ModemManager bluez libnotify polkit
7
7
 
8
8
  if ! grep -q :el /etc/os-release; then
9
9
  dnf -y install power-profiles-daemon iio-sensor-proxy python3-pytest
@@ -14,8 +14,7 @@ eatmydata apt-get -y --purge dist-upgrade
14
14
  eatmydata apt-get install --no-install-recommends -y git \
15
15
  python3-all python3-setuptools python3-setuptools-scm python3-build python3-venv \
16
16
  python3-dbus python3-pytest python3-gi gir1.2-glib-2.0 \
17
- dbus libnotify-bin upower network-manager bluez ofono ofono-scripts power-profiles-daemon \
18
- modemmanager
17
+ dbus libnotify-bin upower network-manager bluez ofono ofono-scripts power-profiles-daemon
19
18
 
20
19
  # systemd's tools otherwise fail on "not been booted with systemd"
21
20
  mkdir -p /run/systemd/system
@@ -3,7 +3,7 @@ set -eux
3
3
  # install build dependencies
4
4
  dnf -y install python3-setuptools python3 python3-gobject-base \
5
5
  python3-dbus dbus-x11 util-linux \
6
- upower NetworkManager bluez libnotify polkit
6
+ upower NetworkManager ModemManager bluez libnotify polkit
7
7
 
8
8
  if ! grep -q :el /etc/os-release; then
9
9
  dnf -y install power-profiles-daemon iio-sensor-proxy python3-pytest
@@ -14,8 +14,7 @@ eatmydata apt-get -y --purge dist-upgrade
14
14
  eatmydata apt-get install --no-install-recommends -y git \
15
15
  python3-all python3-setuptools python3-setuptools-scm python3-build python3-venv \
16
16
  python3-dbus python3-pytest python3-gi gir1.2-glib-2.0 \
17
- dbus libnotify-bin upower network-manager bluez ofono ofono-scripts power-profiles-daemon \
18
- modemmanager
17
+ dbus libnotify-bin upower network-manager bluez ofono ofono-scripts power-profiles-daemon
19
18
 
20
19
  # systemd's tools otherwise fail on "not been booted with systemd"
21
20
  mkdir -p /run/systemd/system
@@ -108,6 +108,7 @@ class TestModemManagerModemMmcli(TestModemManagerMmcliBase):
108
108
  " | current: allowed: 4g; preferred: 4g",
109
109
  " -----------------------------",
110
110
  " 3GPP | imei: doesnotmatter",
111
+ " | operator id: 00101",
111
112
  " | operator name: TheOperator",
112
113
  " | registration: idle",
113
114
  " -----------------------------",
@@ -54,21 +54,17 @@ class TestNotificationDaemon(dbusmock.DBusTestCase):
54
54
  log = self.p_mock.stdout.read()
55
55
  self.assertRegex(log, b'[0-9.]+ Notify "notify-send" 0 "" "title" "my text" \\[\\]')
56
56
 
57
- @unittest.skipIf(notify_send_version < "0.7.5", "this requires libnotify >= 0.7.5")
58
57
  def test_options(self):
59
58
  """notify-send with some options"""
60
59
 
61
60
  subprocess.check_call(["notify-send", "-t", "27", "-a", "fooApp", "-i", "warning_icon", "title", "my text"])
62
61
  log = self.p_mock.stdout.read()
63
62
  # HACK: Why is the timeout missing on s390x?
64
- if os.uname().machine == "s390x":
65
- self.assertRegex(
66
- log, b'[0-9.]+ Notify "fooApp" 0 "warning_icon" "title" "my text" \\[\\] {.*"urgency": 1'
67
- )
68
- else:
69
- self.assertRegex(
70
- log, b'[0-9.]+ Notify "fooApp" 0 "warning_icon" "title" "my text" \\[\\] {.*"urgency": 1.* 27\n'
71
- )
63
+ if os.uname().machine != "s390x":
64
+ self.assertRegex(log, rb"[0-9.]+ Notify.* 27\n")
65
+ # libnotify 0.8.4 changes warning_icon from positional to optional argument, so check that separately
66
+ self.assertRegex(log, rb'[0-9.]+ Notify "fooApp" 0 "(warning_icon)?" "title" "my text" \[\] {.*"urgency": 1')
67
+ self.assertRegex(log, rb"[0-9.]+ Notify .*warning_icon")
72
68
 
73
69
  def test_id(self):
74
70
  """ID handling"""
@@ -1 +0,0 @@
1
- __version__ = "0.34.2"
File without changes
@@ -25,9 +25,9 @@ from pathlib import Path
25
25
  import dbus
26
26
  import dbus.mainloop.glib
27
27
  from gi.repository import GLib
28
+ from packaging.version import Version
28
29
 
29
30
  import dbusmock
30
- from packaging.version import Version
31
31
 
32
32
  tracemalloc.start(25)
33
33
  dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -21,6 +21,7 @@ import unittest
21
21
  import dbus
22
22
  import dbus.mainloop.glib
23
23
  from gi.repository import GLib
24
+ from packaging.version import Version
24
25
 
25
26
  import dbusmock
26
27
  from dbusmock.templates.networkmanager import (
@@ -35,7 +36,6 @@ from dbusmock.templates.networkmanager import (
35
36
  NMConnectivityState,
36
37
  NMState,
37
38
  )
38
- from packaging.version import Version
39
39
 
40
40
  tracemalloc.start(25)
41
41
  dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)