| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
mock.patch.multiple causes the patch result to be a dictionary,
which causes the autospec to fail. This patch will autospec
properly in this scenario as well.
Change-Id: I3aa97459bf53059422c8fa696cb09df811c1701b
Related-Bug: #1735588
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In typical unit tests, almost all of the dependencies are mocked or
patched (mock.patch), without any guarantee that the mocked methods
actually exist, or if their signatures are respected (see below). Because
of this, actual issues can easily be overlooked and missed, as the unit
tests are wrongfully passing.
The mock.Mock class accepts a spec as an argument, which only solves half
the problem: it only checks if an attribute exists, based on the given
spec. It does not guarantee that the given attribute is actually a method,
or if its signature is respected. Some unit tests may pass the autospec
argument, but mock doesn't support it at the moment.
mock.patch, mock.patch.object, mock.patch.multiple accept an autospec
argument, but because of a bug, it cannot be used properly.
Adds a fixture which replaces mock.Mock and mock.MagicMock with
subclass which accepts the autospec argument, and on call, it will
check the signature of the called method / function.
Adds a function which replaces mock.mock._patch with a subclass, which
treats the autospec argument properly (consumes the self / cls argument),
and sets autospec=True by default, unless otherwise specified.
WARNING: this function is not a fixture, and in order to benefit from it,
it will have to be called as EARLY as possible, before any test classes
are loaded, otherwise the original mock.mock._patch is used instead.
Needed-By: I3636833962c905faa0f144c7fdc4833037324d31
Needed-By: I4484e63c97bd1cdde3d88855eabe7545784f365e
Closes-Bug: #1735588
Change-Id: I0e4a55fbf4c1d175726ca22b664e240849a99856
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: I4b5269fe56c6eba07d4d9044ca8ec3c53758d952
|
|/
|
|
|
|
|
|
|
|
|
| |
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: Iafae5f3111c968a4ec2adf63e447459f3ccc41ae
|
|
|
|
| |
Change-Id: I9f6ee979cf2eb102ad42e163f2690e0143d01326
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ic40c78f618f0cf3ee7e5d15f4ba3c4e0c33db513
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.
Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.
This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.
Change-Id: Ieb0be952943e102678657758875a5d13fb4d28e4
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
That was announced with commit 5e2a84d41. Use fixtures.Mock* classes instead.
Closes-Bug: #1712017
Change-Id: I367e59e7f9040cd95cb4ed8a2c3e0f526c2825ab
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
oslotest is a very basic module and should depend on as less as
possible things. Currently oslotest.functional requires
os-cloud-config which test-requires oslotest. Removing
oslotest.functional solves this.
Also oslotest.functional is not used anywhere.
Change-Id: I553fc81a8ec55435004af27c4a34707cff9cf38d
|
| |
| |
| |
| | |
Change-Id: I9d9844ac087fa270245a1c31e4c4f775f05f4fe9
|
|/
|
|
| |
Change-Id: Id1770bfd57a6f7e5b42d45f438f19fc52e8a76c3
|
|
|
|
| |
Change-Id: I1bad14344374f4e3169263dcc14a5b6ad51c1576
|
|
|
|
| |
Change-Id: If4a22865a9a54ad521fe020a464d8f2ecae05c8e
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Following OpenStack Style Guidelines: [1]
Unit test assertions tend to give better messages for more
specific assertions. As a result, assertIsNone(...) is
preferred over assertIs(None, ...) and assertIsNotNone(...)
is preferred over assertIsNot(None, ...).
[1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
Change-Id: Ib2eea3c4fba81849338a3aad538dd58a56bc3f11
|
| |
| |
| |
| | |
Change-Id: I5ea530c8666395885f798b925f4395c286a0eb9a
|
| |
| |
| |
| | |
Change-Id: I9b645c7d29189985fc4940b86e6892ff21b59b84
|
|/
|
|
| |
Change-Id: Ia9928446bdacdc3ac9d02a1d004c3f67c01f78a6
|
|
|
|
|
| |
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Change-Id: Ic1cf3f4b0510d18961d3d15d7776aeeebb071193
|
|
|
|
|
|
|
|
|
|
| |
This module mockpatch of oslotest[1] is deprecated since version 1.13
and may be removed in version 2.0. Use fixtures.Mock* classes instead[2]
[1]OpenStack Testing Framework and Utilities
[2]https://docs.openstack.org/oslotest/latest/api/oslotest.mockpatch.html#module-oslotest.mockpatch
Change-Id: I21306034427447221d2a27f5ed52a0f1fdb6a95e
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change removes the now unused "warnerrors" setting,
which is replaced by "warning-is-error" in sphinx
releases >= 1.5 [1].
[1] http://lists.openstack.org/pipermail/openstack-dev/
2017-March/113085.html
Change-Id: I573c0e7105678e09581c6d40b86c8a3102c8d882
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Make the underline match the title
Change-Id: I01a0ce6d6016100ecde11022b915ce1bc0ac0ecd
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As part of the docs migration work[0] for Pike we need to switch to use
the openstackdocstheme.
[0]https://review.openstack.org/#/c/472275/
Change-Id: If8e423b05eac3a8477997833439af74cd3ae7e58
|
|/ /
| |
| |
| | |
Change-Id: Iced3063934143f301831db12f2cea13d9af43887
|
|/
|
|
| |
Change-Id: I5db8e206ff4838a65109c040c20e3ce2bda11f91
|
|
|
|
| |
Change-Id: I1edf53b34b7fb6f5af3448ca5f9a816e85bbf737
|
|
|
|
| |
Change-Id: I7dda4f21357bea82dec9a78abc81766404bed579
|
|
|
|
| |
Change-Id: I2acd9ec93a19cfd413ef0760911f0d4692944e43
|
|
|
|
| |
Change-Id: I99dd0f65831530c105c97aa54ce9826dc6707829
|
|
|
|
| |
Change-Id: I9f7651fc3d66444f8ed5d89906dcf4326975d054
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I29fe734a64f961110d177162b04ee984f3b1102f
|
|/
|
|
|
|
|
|
| |
The gating on python 3.4 is restricted to <= Mitaka. This is due
to the change from Ubuntu Trusty to Xenial, where only python3.5
is available. There is no need to continue to keep these settings.
Change-Id: Idc263504b68bc909fe7c6cd983c27c1fcc384c16
|
|
|
|
| |
Change-Id: I942d25bde0d61086b76dde636c5950530175d8fe
|
|
|
|
|
|
|
|
|
| |
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848
Change-Id: I5e5c437a46c3e808a25c0db4b6adaef4e55f0fbd
|
|
|
|
| |
Change-Id: Iff8d7f2d24e8700bd036b68b68b4585b884e2acc
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I6c61d10509890ec488a3244271ac0afd301782f4
|
|/
|
|
| |
Change-Id: I689739369f0589ce69bcfdda4c296fd8f0d3859d
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Set the correct link for home-page.
Change-Id: Ia2a6e2506d38bcd05b0d79797793d56b109e5a74
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove oslotest.
Change-Id: I21e2d0555334a1bd7ad8aa37796f599292b30ed0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds the team's and repository's badges to the README file.
The motivation behind this is to communicate the project status and
features at first glance.
For more information about this effort, please read this email thread:
http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html
To see an example of how this would look like check:
b'https://gist.github.com/1233407d5bad86e1279515f5a2d3376d\n'
Change-Id: I66c28e403cf5113133c7b618783f5860ea6343a9
|