Accepting request 663324 from GNOME:Next

New upstream release. Maintainers, please consider subbing this package to TW proper, we will need it for testing gnome-control-center during build for later versions. See rq#663319

OBS-URL: https://build.opensuse.org/request/show/663324
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-dbusmock?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal 2019-01-07 10:41:17 +00:00 committed by Git OBS Bridge
commit 6464a5ccd8
5 changed files with 210 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b0bccb1fd1534e1ad29ba566d68ee72c16893a0cae17655893844556cc1540c2
size 71974

View File

@ -0,0 +1,78 @@
-------------------------------------------------------------------
Mon Jan 7 10:12:31 UTC 2019 - bjorn.lie@gmail.com
- Update to version 0.18.1:
* test: Fix failures with systemd 239 in chroots
- Changes from version 0.18:
* logind template: Add support for suspend-then-hibernate
* NetworkManager template: Add GetConnectionByUuid method
* bluez template: Add PairDevice() 'class_' parameter
* Fix logging of unicode strings in Python 2
* Adjust logind and timedated tests to systemd 239
- Changes from version 0.17.2:
* NetworkManager template: Add GetDeviceByIpIface()
* Move release tarballs from Launchpad to
<https://github.com/martinpitt/python-dbusmock/releases>
<https://pypi.python.org/pypi/python-dbusmock> remains as usual
- Changes from version 0.17.1:
* Fix NetworkManager tests due to name changes from
802-11-wireless to wifi
- Changes from version 0.17:
* Call dbus-daemon directly instead of dbus-launch
* Fix DBusTestCase.stop_dbus() to actually enforce a timeout
+ Fix test_timedated for changed timedatectl output format in
systemd 235.
-------------------------------------------------------------------
Tue Nov 14 20:00:48 UTC 2017 - toddrme2178@gmail.com
- Provide/obsolete python-dbusmock
-------------------------------------------------------------------
Wed Oct 18 16:42:48 UTC 2017 - toddrme2178@gmail.com
- Implement single-spec version
- Rename to python-python-dbusmock to conform to python package
naming rules
- Update to version 0.16.9
* See changelog at https://github.com/martinpitt/python-dbusmock/blob/0.16.9/NEWS
-------------------------------------------------------------------
Sat Mar 5 13:34:34 UTC 2016 - sor.alexei@meowr.ru
- Update to 0.16.3 (changes since 0.16.1):
* NetworkManager template: Fix connection settings Updated signal
emitted by wrong object.
* NetworkManager template: Handle empty device at connection
activation.
* NetworkManager template: Implement secrets management in
settings.
* NetworkManager template test: Make the test run standalone.
-------------------------------------------------------------------
Sat Oct 31 10:21:56 UTC 2015 - sor.alexei@meowr.ru
- Update to 0.16.1 (changes since 0.15.2):
* NetworkManager template: Add missing properties to ethernet
device and active connection.
* Quiesce irrelevant PEP-8 errors with pep8 1.6.
* NetworkManager template: Generate a new unused name in
connection activation instead of just using the access point
name.
* Allow the passing of template parameters via the command-line
as JSON strings.
* NetworkManager template: Fix indexing bug in
SettingsAddConnection.
-------------------------------------------------------------------
Wed Aug 5 05:22:32 UTC 2015 - sor.alexei@meowr.ru
- Update to 0.15.2:
* test_ofono: Do not check "private" fields.
* timedated template: Add NTPSynchronized property and set it in
SetNTP().
-------------------------------------------------------------------
Sun Jun 7 12:12:45 UTC 2015 - sor.alexei@meowr.ru
- Initial package.

105
python-python-dbusmock.spec Normal file
View File

@ -0,0 +1,105 @@
#
# spec file for package python-python-dbusmock
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-python-dbusmock
Version: 0.18.1
Release: 0
License: LGPL-3.0+
Summary: Mock D-Bus objects
Url: https://launchpad.net/python-dbusmock
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/python-dbusmock/python-dbusmock-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(gobject-introspection-1.0)
%if %{with test}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module dbus-python}
%endif
Requires: dbus-1-python
Requires: dbus-1-x11
Requires: python-gobject
Provides: python-dbusmock = %{version}
BuildArch: noarch
%python_subpackages
%description
With this program/Python library you can easily create mock objects on D-Bus.
This is useful for writing tests for software which talks to D-Bus services
such as upower, systemd, logind, gnome-session or others, and it is hard
(or impossible without root privileges) to set the state of the real services
to what you expect in your tests.
Suppose you want to write tests for gnome-settings-daemon's power plugin, or
another program that talks to upower. You want to verify that after the
configured idle time the program suspends the machine. So your program calls
``org.freedesktop.UPower.Suspend()`` on the system D-Bus.
Now, your test suite should not really talk to the actual system D-Bus and the
real upower; a ``make check`` that suspends your machine will not be considered
very friendly by most people, and if you want to run this in continuous
integration test servers or package build environments, chances are that your
process does not have the privilege to suspend, or there is no system bus or
upower to begin with. Likewise, there is no way for an user process to
forcefully set the system/seat idle flag in logind, so your
tests cannot set up the expected test environment on the real daemon.
That's where mock objects come into play: They look like the real API (or at
least the parts that you actually need), but they do not actually do anything
(or only some action that you specify yourself). You can configure their
state, behaviour and responses as you like in your test, without making any
assumptions about the real system status.
When using a local system/session bus, you can do unit or integration testing
without needing root privileges or disturbing a running system. The Python API
offers some convenience functions like ``start_session_bus()`` and
``start_system_bus()`` for this, in a ``DBusTestCase`` class (subclass of the
standard ``unittest.TestCase``).
You can use this with any programming language, as you can run the mocker as a
normal program. The actual setup of the mock (adding objects, methods,
properties, and signals) all happen via D-Bus methods on the
``org.freedesktop.DBus.Mock`` interface. You just don't have the convenience
D-Bus launch API that way.
%prep
%setup -q -n python-dbusmock-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec setup.py test
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc COPYING NEWS README.rst
%{python_sitelib}/dbusmock/
%{python_sitelib}/python_dbusmock-%{version}-py*.egg-info
%changelog