python-dbusmock 0.34.3__tar.gz → 0.36.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.34.3 → python_dbusmock-0.36.0}/.github/workflows/pages.yml +19 -15
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/.github/workflows/tests.yml +0 -1
- {python_dbusmock-0.34.3/python_dbusmock.egg-info → python_dbusmock-0.36.0}/PKG-INFO +3 -6
- python_dbusmock-0.36.0/dbusmock/_version.py +1 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/mockobject.py +6 -3
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/modemmanager.py +14 -0
- {python_dbusmock-0.34.3/packaging → python_dbusmock-0.36.0/distro}/python-dbusmock.spec +9 -4
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/doc/conf.py +1 -1
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/packit.yaml +5 -3
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0/python_dbusmock.egg-info}/PKG-INFO +3 -6
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/python_dbusmock.egg-info/SOURCES.txt +1 -3
- python_dbusmock-0.36.0/setup.cfg +4 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/run-centos +3 -2
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/run-debian +1 -2
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/run-fedora +3 -2
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/run-ubuntu +1 -2
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_api.py +34 -10
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_modemmanager.py +1 -0
- python_dbusmock-0.34.3/dbusmock/_version.py +0 -1
- python_dbusmock-0.34.3/setup.cfg +0 -35
- python_dbusmock-0.34.3/setup.py +0 -7
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/.fmf/version +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/.github/release.eloquent.yml +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/.github/workflows/release.yml +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/.gitignore +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/.pre-commit-config.yaml +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/COPYING +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/NEWS +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/README.md +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/__init__.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/__main__.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/pytest_fixtures.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/SKELETON +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/__init__.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/bluez5-obex.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/bluez5.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/gnome_screensaver.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/gsd_rfkill.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/iio-sensors-proxy.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/logind.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/low_memory_monitor.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/networkmanager.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/notification_daemon.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/ofono.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/polkitd.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/power_profiles_daemon.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/systemd.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/timedated.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/upower.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/upower_power_profiles_daemon.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/urfkill.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/testcase.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/doc/index.rst +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/plans/all.fmf +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/pyproject.toml +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/python_dbusmock.egg-info/dependency_links.txt +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/python_dbusmock.egg-info/requires.txt +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/python_dbusmock.egg-info/top_level.txt +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/__init__.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/conftest.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/main.fmf +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/run +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_api_pytest.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_bluez5.py +1 -1
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_cli.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_code.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_gnome_screensaver.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_gsd_rfkill.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_iio_sensors_proxy.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_logind.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_low_memory_monitor.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_networkmanager.py +1 -1
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_notification_daemon.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_ofono.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_polkitd.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_power_profiles_daemon.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_systemd.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_timedated.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/tests/test_upower.py +0 -0
- {python_dbusmock-0.34.3 → python_dbusmock-0.36.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
|
-
|
|
22
|
-
runs-on: ubuntu-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
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@
|
|
56
|
+
uses: actions/deploy-pages@v4
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-dbusmock
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.36.0
|
|
4
4
|
Summary: Mock D-Bus objects
|
|
5
|
-
Home-page: https://github.com/martinpitt/python-dbusmock
|
|
6
|
-
Download-URL: https://pypi.python.org/pypi/python-dbusmock/
|
|
7
|
-
Author: Martin Pitt
|
|
8
5
|
Author-email: Martin Pitt <martin@piware.de>
|
|
9
6
|
License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
10
7
|
Version 3, 29 June 2007
|
|
@@ -188,7 +185,7 @@ Requires-Python: >=3.8
|
|
|
188
185
|
Description-Content-Type: text/markdown
|
|
189
186
|
License-File: COPYING
|
|
190
187
|
Requires-Dist: dbus-python
|
|
191
|
-
Dynamic:
|
|
188
|
+
Dynamic: license-file
|
|
192
189
|
|
|
193
190
|

|
|
194
191
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.36.0"
|
|
@@ -116,10 +116,8 @@ def _wrap_in_dbus_variant(value):
|
|
|
116
116
|
dbus.types.ByteArray,
|
|
117
117
|
dbus.types.Int16,
|
|
118
118
|
dbus.types.ObjectPath,
|
|
119
|
-
dbus.types.Struct,
|
|
120
119
|
dbus.types.UInt64,
|
|
121
120
|
dbus.types.Boolean,
|
|
122
|
-
dbus.types.Dictionary,
|
|
123
121
|
dbus.types.Int32,
|
|
124
122
|
dbus.types.Signature,
|
|
125
123
|
dbus.types.UInt16,
|
|
@@ -130,9 +128,14 @@ def _wrap_in_dbus_variant(value):
|
|
|
130
128
|
dbus.types.String,
|
|
131
129
|
dbus.types.UInt32,
|
|
132
130
|
]
|
|
131
|
+
container_types = [
|
|
132
|
+
dbus.types.Array,
|
|
133
|
+
dbus.types.Struct,
|
|
134
|
+
dbus.types.Dictionary,
|
|
135
|
+
]
|
|
133
136
|
if isinstance(value, dbus.String):
|
|
134
137
|
return dbus.String(str(value), variant_level=1)
|
|
135
|
-
if
|
|
138
|
+
if type(value) in container_types:
|
|
136
139
|
return value
|
|
137
140
|
if type(value) in dbus_types:
|
|
138
141
|
return type(value)(value.conjugate(), variant_level=1)
|
|
@@ -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)
|
|
@@ -13,6 +13,8 @@ BuildArch: noarch
|
|
|
13
13
|
BuildRequires: git
|
|
14
14
|
BuildRequires: python3-dbus
|
|
15
15
|
BuildRequires: python3-devel
|
|
16
|
+
BuildRequires: python3dist(setuptools-scm)
|
|
17
|
+
BuildRequires: python3dist(wheel)
|
|
16
18
|
BuildRequires: python3-setuptools
|
|
17
19
|
BuildRequires: python3-gobject
|
|
18
20
|
BuildRequires: python3-pytest
|
|
@@ -37,18 +39,21 @@ Requires: python3-dbus, python3-gobject, dbus-x11
|
|
|
37
39
|
%autosetup -n python_%{modname}-%{version}
|
|
38
40
|
rm -rf python-%{modname}.egg-info
|
|
39
41
|
|
|
42
|
+
%generate_buildrequires
|
|
43
|
+
%pyproject_buildrequires
|
|
40
44
|
|
|
41
45
|
%build
|
|
42
|
-
%
|
|
46
|
+
%pyproject_wheel
|
|
43
47
|
|
|
44
48
|
%install
|
|
45
|
-
%
|
|
49
|
+
%pyproject_install
|
|
50
|
+
%pyproject_save_files -l dbusmock
|
|
46
51
|
|
|
47
52
|
%check
|
|
48
53
|
%{__python3} -m unittest -v
|
|
49
54
|
|
|
50
|
-
%files -n python3-dbusmock
|
|
55
|
+
%files -n python3-dbusmock -f %{pyproject_files}
|
|
56
|
+
|
|
51
57
|
%doc README.md COPYING
|
|
52
|
-
%{python3_sitelib}/*%{modname}*
|
|
53
58
|
|
|
54
59
|
%changelog
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# https://packit.dev/docs/configuration/
|
|
3
3
|
upstream_project_url: https://github.com/martinpitt/python-dbusmock
|
|
4
4
|
# HACK: should work without, but propose_downstream fails; https://github.com/packit/packit-service/issues/1511
|
|
5
|
-
specfile_path:
|
|
5
|
+
specfile_path: distro/python-dbusmock.spec
|
|
6
6
|
issue_repository: https://github.com/martinpitt/python-dbusmock
|
|
7
7
|
copy_upstream_release_description: true
|
|
8
8
|
upstream_package_name: python-dbusmock
|
|
@@ -12,7 +12,7 @@ actions:
|
|
|
12
12
|
create-archive:
|
|
13
13
|
- python3 -m build --sdist
|
|
14
14
|
# spec and tarball need to be in the same directory
|
|
15
|
-
- sh -c 'mv dist/*.tar.*
|
|
15
|
+
- sh -c 'mv dist/*.tar.* distro; ls distro/python_dbusmock-*.tar.*'
|
|
16
16
|
|
|
17
17
|
srpm_build_deps:
|
|
18
18
|
- python3-build
|
|
@@ -28,12 +28,14 @@ jobs:
|
|
|
28
28
|
- fedora-latest-ppc64le
|
|
29
29
|
- fedora-latest-s390x
|
|
30
30
|
- fedora-latest-armhfp
|
|
31
|
+
# needed for tests
|
|
32
|
+
- fedora-all
|
|
33
|
+
- centos-stream-10-x86_64
|
|
31
34
|
|
|
32
35
|
- job: tests
|
|
33
36
|
trigger: pull_request
|
|
34
37
|
targets:
|
|
35
38
|
- fedora-all
|
|
36
|
-
- centos-stream-9-x86_64
|
|
37
39
|
- centos-stream-10-x86_64
|
|
38
40
|
|
|
39
41
|
- job: propose_downstream
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-dbusmock
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.36.0
|
|
4
4
|
Summary: Mock D-Bus objects
|
|
5
|
-
Home-page: https://github.com/martinpitt/python-dbusmock
|
|
6
|
-
Download-URL: https://pypi.python.org/pypi/python-dbusmock/
|
|
7
|
-
Author: Martin Pitt
|
|
8
5
|
Author-email: Martin Pitt <martin@piware.de>
|
|
9
6
|
License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
10
7
|
Version 3, 29 June 2007
|
|
@@ -188,7 +185,7 @@ Requires-Python: >=3.8
|
|
|
188
185
|
Description-Content-Type: text/markdown
|
|
189
186
|
License-File: COPYING
|
|
190
187
|
Requires-Dist: dbus-python
|
|
191
|
-
Dynamic:
|
|
188
|
+
Dynamic: license-file
|
|
192
189
|
|
|
193
190
|

|
|
194
191
|
|
|
@@ -5,8 +5,6 @@ NEWS
|
|
|
5
5
|
README.md
|
|
6
6
|
packit.yaml
|
|
7
7
|
pyproject.toml
|
|
8
|
-
setup.cfg
|
|
9
|
-
setup.py
|
|
10
8
|
.fmf/version
|
|
11
9
|
.github/release.eloquent.yml
|
|
12
10
|
.github/workflows/pages.yml
|
|
@@ -38,9 +36,9 @@ dbusmock/templates/timedated.py
|
|
|
38
36
|
dbusmock/templates/upower.py
|
|
39
37
|
dbusmock/templates/upower_power_profiles_daemon.py
|
|
40
38
|
dbusmock/templates/urfkill.py
|
|
39
|
+
distro/python-dbusmock.spec
|
|
41
40
|
doc/conf.py
|
|
42
41
|
doc/index.rst
|
|
43
|
-
packaging/python-dbusmock.spec
|
|
44
42
|
plans/all.fmf
|
|
45
43
|
python_dbusmock.egg-info/PKG-INFO
|
|
46
44
|
python_dbusmock.egg-info/SOURCES.txt
|
|
@@ -3,10 +3,11 @@ 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
|
+
# skip iio-sensor-proxy: https://github.com/martinpitt/python-dbusmock/issues/241
|
|
10
|
+
dnf -y install power-profiles-daemon python3-pytest
|
|
10
11
|
else
|
|
11
12
|
dnf -y install python3-pip
|
|
12
13
|
pip install 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,10 +3,11 @@ 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
|
+
# skip iio-sensor-proxy: https://github.com/martinpitt/python-dbusmock/issues/241
|
|
10
|
+
dnf -y install power-profiles-daemon python3-pytest
|
|
10
11
|
else
|
|
11
12
|
dnf -y install python3-pip
|
|
12
13
|
pip install 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
|
|
@@ -343,6 +343,32 @@ assert args[2] == 5
|
|
|
343
343
|
self.assertEqual(self.dbus_props.GetAll("org.freedesktop.Test.Other"), {"color": "yellow"})
|
|
344
344
|
self.assertEqual(self.dbus_props.Get("org.freedesktop.Test.Other", "color"), "yellow")
|
|
345
345
|
|
|
346
|
+
# add properties with complex types
|
|
347
|
+
self.dbus_mock.AddProperty("org.freedesktop.Test.Main", "intarray", dbus.Array([1, 2]))
|
|
348
|
+
self.dbus_mock.AddProperty("org.freedesktop.Test.Main", "vardict", dbus.Dictionary({"a": 1}))
|
|
349
|
+
self.dbus_mock.AddProperty("org.freedesktop.Test.Main", "struct", dbus.Struct((1, "a")))
|
|
350
|
+
|
|
351
|
+
changes = [
|
|
352
|
+
{
|
|
353
|
+
"version": 5,
|
|
354
|
+
"connected": False,
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"intarray": [1, 3],
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"vardict": {"b": "2"},
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"struct": (2, "b"),
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"intarray": [3, 7],
|
|
367
|
+
"vardict": {"d": dbus.Array([42, 1])},
|
|
368
|
+
"struct": (0, "test"),
|
|
369
|
+
},
|
|
370
|
+
]
|
|
371
|
+
|
|
346
372
|
changed_props = []
|
|
347
373
|
ml = GLib.MainLoop()
|
|
348
374
|
|
|
@@ -357,28 +383,26 @@ assert args[2] == 5
|
|
|
357
383
|
self.assertEqual(iface, "org.freedesktop.Test.Main")
|
|
358
384
|
|
|
359
385
|
changed_props.append(changed)
|
|
360
|
-
|
|
386
|
+
|
|
387
|
+
if len(changed_props) == len(changes):
|
|
388
|
+
ml.quit()
|
|
361
389
|
|
|
362
390
|
match = self.dbus_con.add_signal_receiver(
|
|
363
391
|
catch, interface_keyword="interface", path_keyword="path", member_keyword="member"
|
|
364
392
|
)
|
|
365
393
|
|
|
366
394
|
# change property using mock helper
|
|
367
|
-
|
|
368
|
-
"org.freedesktop.Test.Main",
|
|
369
|
-
|
|
370
|
-
"version": 5,
|
|
371
|
-
"connected": False,
|
|
372
|
-
},
|
|
373
|
-
)
|
|
395
|
+
for change in changes:
|
|
396
|
+
self.dbus_mock.UpdateProperties("org.freedesktop.Test.Main", change)
|
|
397
|
+
self.assertTrue(change.items() <= self.dbus_props.GetAll("org.freedesktop.Test.Main").items())
|
|
374
398
|
|
|
375
399
|
GLib.timeout_add(3000, ml.quit)
|
|
376
400
|
ml.run()
|
|
377
401
|
|
|
378
402
|
match.remove()
|
|
379
403
|
|
|
380
|
-
|
|
381
|
-
|
|
404
|
+
for i, change in enumerate(changes):
|
|
405
|
+
self.assertEqual(changed_props[i], change)
|
|
382
406
|
|
|
383
407
|
# test adding properties with the array type
|
|
384
408
|
self.dbus_mock.AddProperty("org.freedesktop.Test.Main", "array", dbus.Array(["first"], signature="s"))
|
|
@@ -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
|
" -----------------------------",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.34.3"
|
python_dbusmock-0.34.3/setup.cfg
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
[metadata]
|
|
2
|
-
name = python-dbusmock
|
|
3
|
-
version = attr: dbusmock.__version__
|
|
4
|
-
description = Mock D-Bus objects
|
|
5
|
-
long_description = file: README.md
|
|
6
|
-
long_description_content_type = text/markdown
|
|
7
|
-
author = Martin Pitt
|
|
8
|
-
author_email = martin@piware.de
|
|
9
|
-
url = https://github.com/martinpitt/python-dbusmock
|
|
10
|
-
download_url = https://pypi.python.org/pypi/python-dbusmock/
|
|
11
|
-
license = LGPL 3+
|
|
12
|
-
classifiers =
|
|
13
|
-
License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
|
|
14
|
-
Programming Language :: Python :: 3
|
|
15
|
-
Development Status :: 6 - Mature
|
|
16
|
-
Operating System :: POSIX :: Linux
|
|
17
|
-
Operating System :: POSIX :: BSD
|
|
18
|
-
Operating System :: Unix
|
|
19
|
-
Topic :: Software Development :: Quality Assurance
|
|
20
|
-
Topic :: Software Development :: Testing
|
|
21
|
-
Topic :: Software Development :: Testing :: Mocking
|
|
22
|
-
Topic :: Software Development :: Testing :: Unit
|
|
23
|
-
Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
-
|
|
25
|
-
[options]
|
|
26
|
-
packages =
|
|
27
|
-
dbusmock
|
|
28
|
-
dbusmock.templates
|
|
29
|
-
install_requires =
|
|
30
|
-
dbus-python
|
|
31
|
-
|
|
32
|
-
[egg_info]
|
|
33
|
-
tag_build =
|
|
34
|
-
tag_date = 0
|
|
35
|
-
|
python_dbusmock-0.34.3/setup.py
DELETED
|
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.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/power_profiles_daemon.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_dbusmock-0.34.3 → python_dbusmock-0.36.0}/dbusmock/templates/upower_power_profiles_daemon.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_dbusmock-0.34.3 → python_dbusmock-0.36.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
|
|
@@ -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)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|