summaryrefslogtreecommitdiff
path: root/taskflow/tests/unit/test_engine_helpers.py
Commit message (Collapse)AuthorAgeFilesLines
* Replace assertRaisesRegexp with assertRaisesRegexVu Cong Tuan2017-06-031-16/+16
| | | | | | | | | | assertRaisesRegexp was renamed to assertRaisesRegex in Py3.2 For more details, please check: https://docs.python.org/3/library/ unittest.html#unittest.TestCase.assertRaisesRegex Change-Id: I89cce19e80b04074aab9f49a76c7652acace78b3 Closes-Bug: #1436957
* Fix order of assertEqual for unit.test_*lin-hua-cheng2015-10-171-8/+8
| | | | | | | First parameter should be the expected value. Change-Id: I2941296e38c3245da298cc64aeb5636fbc4b2eb6 Partial-Bug: #1357117
* Fix mock callsDoug Hellmann2015-07-101-2/+2
| | | | | | Use the proper assertion methods of the mocks. Change-Id: I7b02f3b52012976a3ed0b8d5fc445653c0546547
* Switch to using 'oslo_utils' vs 'oslo.utils'Joshua Harlow2015-01-141-2/+2
| | | | | | | | Prefer the non-deprecated 'oslo_utils' instead of the namespaced 'oslo.utils' wherever it was previously used. Change-Id: I9a78150ef5266e1ff22147278162fe3cfe1b2e3f
* Deprecate `engine_conf` and prefer `engine` insteadJoshua Harlow2014-10-181-4/+17
| | | | | | | | | | | | | | | | | | | | | | To avoid having one set of options coming from `engine_conf` and another set of options coming from `kwargs` and another set coming from `engine_conf` if it is a URI just start to shift toward `engine_conf` being deprecated and `engine` being a string type only (or a URI with additional query parameters) and having any additional **kwargs that are provided just get merged into the final engine options. This adds a new helper function that handles all these various options and adds in a keyword argument `engine` that will be shifted to in a future version (in that future version we can also then remove the `engine_conf` and just stick to a smaller set of option mechanisms). It also adjusts all examples to use this new and more easier to understand format and adjusts tests, conductor interface to use this new more easily understandable style of getting an engine. Change-Id: Ic7617057338e0c63775cf38a24643cff6e454950
* Use oslotest to provide our base test case classJoshua Harlow2014-09-271-2/+1
| | | | | | | | | | | | | | | | The oslotest library has a nice openstack testing integrated base class that can ensure we setup our base test case using the right logging fixtures, test timeouts, and output fixtures that better operate in the openstack ecosystem. This will also allow us to remove some of the functionality that we currently have in our base test case and replace it with the equivalent (or better) functionality that oslotest now provides. Part of blueprint use-oslo-test Change-Id: I1602d5180ec8649a1899185972750ddddf65990f
* Switch to using oslo.utils and oslo.serializationJoshua Harlow2014-09-201-2/+2
| | | | | | | | | | | | Instead of copying modules from the incubator into taskflow we can now directly use these same modules from supported libraries instead so this moves the usage of everything except uuidutils which wasn't moved over to using those newly published libraries. Part of blueprint integrate-and-use-oslo-utils-serialization Change-Id: I1183bda96e1ddb062d9cab91990186f0f56f0a0e
* Enabled hacking checks H305 and H307Christian Berendt2014-07-171-2/+1
| | | | | | | * H305 imports not grouped correctly * H307 like imports should be grouped together Change-Id: If1dd9c89f65ede6959865a885777cb08c263eca0
* Wrap the failure to load in the not found exceptionJoshua Harlow2014-04-301-0/+16
| | | | | | | | | Wrap the loading of the engine into a not found exception to match the usage in other entrypoints. This makes the usage of the various entrypoint loading functions more consistent. Change-Id: Id86f7b716c9b3dd76aba411529d2e647ad93a120
* Set logbook/flowdetail/atomdetail meta to empty dictJoshua Harlow2014-03-271-2/+1
| | | | | | | | | Instead of setting to none, and then later setting to a dictionary just by default set it to an empty dict which makes it more clear what the intended usage of the meta attribute is for. Change-Id: Ic42c423d104f369a43227c4ef4563f1f99635fa0
* Remove extraneous vim configuration commentsyangxurong2014-02-141-2/+0
| | | | | | | | | Remove line containing comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4 Change-Id: I7581cc88b8de433d5609ed06c6570b0b45c13573 Closes-Bug:#1229324
* Fix up python 3.3 incompatabilitiesJoshua Harlow2013-11-211-12/+18
| | | | | | | | | | | | Make the python 3.3 testing work by selectively disabling & including eventlet, switch to testtools and testrepository which has 2.6, 2.7, 3.2+ unified testing support so that we can correctly run our tests in all supported python versions. Closes-Bug: #1251660 Co-authored-by: Alexander Gorodnev <agorodnev@griddynamics.com> Change-Id: I23b6f04387cfd3bf6b5a044edffa446ca897ce3a
* Update code to comply with hacking 0.8.0Ivan A. Melnikov2013-11-081-6/+6
| | | | | | | Replace assertEquals and assertNotEquals with assertEqual and assertNotEqual (new rule, H234), and fix indentation. Change-Id: I86177325dee3aa00af5df8b3085acd478994ee34
* Helpers to save flow factory in metadataIvan A. Melnikov2013-10-141-0/+113
This change adds new helpers that, taken together, allow to resume the flows having nothing but flow detail at hands. First one, load_from_factory, gets flow factory function as a parameter and saves its fully qualified name and arguments to flow metadata. Others can be used to re-create the flow using that metadata, and load it into engine. Change-Id: Ia3cd989b3b0388ec0a9f09fe527f768eec5cc904