neutron/neutron/tests/unit/tests
Martin Matyáš 676257cea0 Remove recursion from import_modules_recursively
Since the function already uses os.walk that will iterate through all
subdirectories for us, there is no need to recursively call the
function.

The recursive call was not just redundant, but also had another problem,
where we were passing relative paths to subdirectories, which made the
function to attempt importing modules that are not located under the
topdir. It could crash, or, worse, import a module that is
not under the expected parent directory.

This patch also modifies an existing unit test for the function to
validate that modules from subdirectories are also imported, even
without the recursive call.

Change-Id: I8b3a844460e4987b8a8375b01353d01e57d91604
Closes-Bug: #1634735
2016-09-30 21:48:50 +00:00
..
common Mock call to sysctl for test_get_free_namespace_port 2016-08-31 14:53:55 -05:00
example Remove recursion from import_modules_recursively 2016-09-30 21:48:50 +00:00
__init__.py Reorganize unit test tree 2015-04-06 23:28:31 +00:00
test_base.py tests: catch eventlet.Timeout exception 2016-09-21 13:34:41 +00:00
test_post_mortem_debug.py Fix params order in assertEqual 2016-01-13 18:24:04 +05:30