[Openstack] Issue in running unit test with Neutron
Romil Gupta
romilgupta19 at gmail.com
Mon Apr 28 09:56:34 UTC 2014
I also tried running unit test with run_test.sh and getting the following
error :
*root at romil-workspace:~/neutron-openstack# ./run_tests.sh -d -N
neutron.tests.unit.test_l3_agent*
*Traceback (most recent call last):*
* File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main*
* "__main__", fname, loader, pkg_name)*
* File "/usr/lib/python2.7/runpy.py", line 72, in _run_code*
* exec code in run_globals*
* File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line
399, in <module>*
* main(sys.argv, sys.stdout)*
* File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line
396, in main*
* stdout=stdout)*
* File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line
206, in __init__*
* self.parseArgs(argv)*
* File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line
283, in parseArgs*
* self.createTests()*
* File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line
292, in createTests*
* self.module)*
* File "/usr/lib/python2.7/unittest/loader.py", line 128, in
loadTestsFromNames*
* suites = [self.loadTestsFromName(name, module) for name in names]*
* File "/usr/lib/python2.7/unittest/loader.py", line 100, in
loadTestsFromName*
* parent, obj = obj, getattr(obj, part)*
*AttributeError: 'module' object has no attribute 'test_l3_agent'*
Need help ....
On Mon, Apr 28, 2014 at 3:09 PM, Romil Gupta <romilgupta19 at gmail.com> wrote:
> Hi Guys,
>
> I am facing issue in running unit test with nose in neutron.
>
> *root at romil-workspace:~/neutron-openstack/neutron/tests/unit/ml2#
> nosetests test_ml2_plugin.py*
> *E*
> *======================================================================*
> *ERROR: Failure: ImportError (cannot import name server_external_events)*
> *----------------------------------------------------------------------*
> *Traceback (most recent call last):*
> * File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 413,
> in loadTestsFromName*
> * addr.filename, addr.module)*
> * File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line
> 47, in importFromPath*
> * return self.importFromDir(dir_path, fqname)*
> * File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line
> 94, in importFromDir*
> * mod = load_module(part_fqname, fh, filename, desc)*
> * File
> "/root/neutron-openstack/neutron/tests/unit/ml2/test_ml2_plugin.py", line
> 29, in <module>*
> * from neutron.plugins.ml2 import plugin as ml2_plugin*
> * File "/root/neutron-openstack/neutron/plugins/ml2/plugin.py", line 27,
> in <module>*
> * from neutron.db import agentschedulers_db*
> * File "/root/neutron-openstack/neutron/db/agentschedulers_db.py", line
> 23, in <module>*
> * from neutron.db import agents_db*
> * File "/root/neutron-openstack/neutron/db/agents_db.py", line 24, in
> <module>*
> * from neutron.extensions import agent as ext_agent*
> * File "/root/neutron-openstack/neutron/extensions/agent.py", line 20, in
> <module>*
> * from neutron.api.v2 import base*
> * File "/root/neutron-openstack/neutron/api/v2/base.py", line 30, in
> <module>*
> * from neutron.notifiers import nova*
> * File "/root/neutron-openstack/neutron/notifiers/nova.py", line 19, in
> <module>*
> * from novaclient.v1_1.contrib import server_external_events*
> *ImportError: cannot import name server_external_events*
>
> *----------------------------------------------------------------------*
> *Ran 1 test in 0.001s*
>
> *FAILED (errors=1)*
>
>
> Please help me to fix this issue.
>
> Thanks in Advance for the help !
>
> --
> *Regards,*
>
> *Romil *
>
--
*Regards,*
*Romil *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140428/ab70c07c/attachment.html>
More information about the Openstack
mailing list