Commit Graph

7 Commits

Author SHA1 Message Date
Vsevolod Fedorov f4d64f9f66 Move tests to pytest
Pytest makes each scenario into individual selectable test.
To be able to run each scenario separately is very useful for development.

Change-Id: I4b1c990a1fd839ce327cd7faa27159a9b9632fed
2022-12-20 10:44:43 +03:00
Thanh Ha 4d90c187a9 Auto-generated output from python-black
Please review the following patch containing the code changes in
the repo. This patch is a transition patch and is the auto-generated
output of the python-black tool.

Change-Id: I2d2de71da8a105fb62b561899ae78441ddab4032
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
2019-09-09 19:23:24 +01:00
Darragh Bailey 4573b3a25d Refactor base test classes inheritance for reuse
Refactor base test class inheritance to allow for BaseTest class to be
reused without needing to also import the TestCase class everywhere in
order to avoid having the common test function executed on base classes.

This makes it easier to build base testing classes and then simplifies
the subclassing of these for actual tests.

Change-Id: I89809e8082469f814f245db4a9ab7658aac8a405
2016-09-14 14:58:57 +01:00
Darragh Bailey 8805a34c0f Reorder imports to match hacking guidelines
Ensure that the imports follow the standard OpenStack hacking
guidelines.

Change-Id: Iaa4326aef118ddfd807dd006934f1d9ca80a1cfa
2015-12-23 15:23:42 -08:00
Darragh Bailey 9bfbffa559 Capture logs with FakeLogging Fixture
Capture logs to attach them on exceptions to simplify the debugging of
errors in tests when they occur.

Change-Id: I5c1b5c306aba37789a8d41eabf65e0ac628af838
2015-09-30 16:25:22 +01:00
Darragh Bailey cae9e63fc4 Find module for exceptions raised from gen_xml
Include ability to retrieve the necessary module information when
exceptions are raised from within the gen_xml function for those modules
that implement using this function directly instead of calling dispatch.
Also to ensure that the exception itself won't raise an exception due to
not being able to detect the correct calling module, ensure a default
value noting it was not able to detect the module is always set first.

Provide a fallback when the code can explicitly specify the module as
the source component of the exception for cases where it may not be
possible to autodetect.

Change-Id: I3f72fe5f05a5e1f40a089e1f828dd295501bd9c7
2015-07-14 15:42:42 +01:00
Wayne 9fff49a7d2 Add InvalidAttributeError and MissingAttributeError.
The point of this patch is to begin promoting a more consistent approach to
producing configuration error messages.

Change-Id: I5cb79c05d791091694731f2034d9205f7eeb76b4
2015-04-21 11:34:13 -07:00