Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: Iee2ca363966243826134c1b5f5c9762d4b53662f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The repo is Python 3 now, so update hacking to version 2.0 which
supports Python 3.
Fix problems found.
Change-Id: I4cebf81b32bdf285f0d412255984c176140329be
Now the murano-pkg-check gives the error:
Exception: Versioning for this project requires either an sdist tarball,
or access to an upstream git repository. Are you sure that git is installed?
This patch correct the package name when get the package version.
Change-Id: I33500b3527e21a513f9130f55f0b54ba0e047d5f
Closes-Bug: #1653060
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can use
dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible,
see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I6368133635a1f56bc923e633be683bcdda36eeb3
Following OpenStack Style Guidelines[1]:
[H203] Unit test assertions tend to give better messages for more
specific assertions. As a result, assertIsNone(...) is preferred
over assertEqual(None, ...) and assertIs(None, ...)
[1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
Change-Id: Ie8136f1be4a57272e64b0b360ee608aa270901f7
This commit improves regexps that check class and method names:
'.' (single dot) is no longer considered a valid method name.
Class names can no longer end with dot or include two dots in a row.
CamelCase detection is also improved to allow short uppercase names
('IP' or 'CDN') and required first letter to be
uppercase (i.e. 'aBCD' is no longer legal)
Added positive and negative tests for these cases
Co-Authored-By: Kirill Zaitsev <k.zaitsev@me.com>
Change-Id: I9cefd115f552cc7067d643c98f4b4a4ab4e11735
* Validation can be runned only for errors. All warnigs will be ommited
* Minor issue in setup.cfg fixed. Now 'pip install -e .' works fine
Change-Id: I57d3f0713ef36535410ec4e50d3bb9286ea2741f
Currently ZipLoader can take only path to zip file with package,
but murano-python client sometimes use path a container for file
content. This behavior should be supported by validator too.
* Increased coverage for ZipLoader
* Fixed minor bug with file list
Change-Id: Ied8b332b7890134e176169c56edf6ba8a5fa1645
In some part in the code we import objects. In the Openstack style
guidelines they recommend to import only modules.
http://docs.openstack.org/developer/hacking/#imports
Change-Id: I019e56040f41a8a55fb6ba179e0f13ffcf053e3b
Functional cases can be described in yaml files in test/functional/cases folder
Each case will be converted into test. Examples of cases included
Change-Id: I60fc763c52ed4c25dfa7164c36c915497a430cfb
* --debug option added
* Logging for exceptions in checkers extended
* Some test coverage improvements
* Added support for external log facility
Change-Id: I856e19a9f22bb1145377ccd5d49e8fc4b9ecf733