<div dir="ltr">I also tried running unit test with run_test.sh and getting the following error :<div><br></div><div><div><i>root@romil-workspace:~/neutron-openstack# ./run_tests.sh -d -N neutron.tests.unit.test_l3_agent</i></div>
<div><i>Traceback (most recent call last):</i></div><div><i> File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main</i></div><div><i> "__main__", fname, loader, pkg_name)</i></div><div>
<i> File "/usr/lib/python2.7/runpy.py", line 72, in _run_code</i></div><div><i> exec code in run_globals</i></div><div><i> File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line 399, in <module></i></div>
<div><i> main(sys.argv, sys.stdout)</i></div><div><i> File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line 396, in main</i></div><div><i> stdout=stdout)</i></div><div><i> File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line 206, in __init__</i></div>
<div><i> self.parseArgs(argv)</i></div><div><i> File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line 283, in parseArgs</i></div><div><i> self.createTests()</i></div><div><i> File "/usr/local/lib/python2.7/dist-packages/testtools/run.py", line 292, in createTests</i></div>
<div><i> self.module)</i></div><div><i> File "/usr/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames</i></div><div><i> suites = [self.loadTestsFromName(name, module) for name in names]</i></div>
<div><i> File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName</i></div><div><i> parent, obj = obj, getattr(obj, part)</i></div><div><i>AttributeError: 'module' object has no attribute 'test_l3_agent'</i></div>
</div><div><i><br></i></div><div><br></div><div>Need help ....</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 28, 2014 at 3:09 PM, Romil Gupta <span dir="ltr"><<a href="mailto:romilgupta19@gmail.com" target="_blank">romilgupta19@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Guys,</div><div><br></div><div>I am facing issue in running unit test with nose in neutron.</div>
<div><br></div><div><div><i>root@romil-workspace:~/neutron-openstack/neutron/tests/unit/ml2# nosetests test_ml2_plugin.py</i></div>
<div><i>E</i></div><div><i>======================================================================</i></div><div><i>ERROR: Failure: ImportError (cannot import name server_external_events)</i></div><div><i>----------------------------------------------------------------------</i></div>
<div><i>Traceback (most recent call last):</i></div><div><i> File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 413, in loadTestsFromName</i></div><div><i> addr.filename, addr.module)</i></div>
<div><i> File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath</i></div><div><i> return self.importFromDir(dir_path, fqname)</i></div><div><i> File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir</i></div>
<div><i> mod = load_module(part_fqname, fh, filename, desc)</i></div><div><i> File "/root/neutron-openstack/neutron/tests/unit/ml2/test_ml2_plugin.py", line 29, in <module></i></div><div><i> from neutron.plugins.ml2 import plugin as ml2_plugin</i></div>
<div><i> File "/root/neutron-openstack/neutron/plugins/ml2/plugin.py", line 27, in <module></i></div><div><i> from neutron.db import agentschedulers_db</i></div><div><i> File "/root/neutron-openstack/neutron/db/agentschedulers_db.py", line 23, in <module></i></div>
<div><i> from neutron.db import agents_db</i></div><div><i> File "/root/neutron-openstack/neutron/db/agents_db.py", line 24, in <module></i></div><div><i> from neutron.extensions import agent as ext_agent</i></div>
<div><i> File "/root/neutron-openstack/neutron/extensions/agent.py", line 20, in <module></i></div><div><i> from neutron.api.v2 import base</i></div><div><i> File "/root/neutron-openstack/neutron/api/v2/base.py", line 30, in <module></i></div>
<div><i> from neutron.notifiers import nova</i></div><div><i> File "/root/neutron-openstack/neutron/notifiers/nova.py", line 19, in <module></i></div><div><i> from novaclient.v1_1.contrib import server_external_events</i></div>
<div><i>ImportError: cannot import name server_external_events</i></div><div><i><br></i></div><div><i>----------------------------------------------------------------------</i></div><div><i>Ran 1 test in 0.001s</i></div>
<div>
<i><br></i></div><div><i>FAILED (errors=1)</i></div></div><div><br></div><div><br></div><div>Please help me to fix this issue.</div><div><br></div><div>Thanks in Advance for the help !</div><span class="HOEnZb"><font color="#888888"><div>
<br></div>-- <br><div dir="ltr">
<b style="color:rgb(102,102,102)">Regards,</b><div><b style="color:rgb(102,102,102)">Romil <br></b><br></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><b style="color:rgb(102,102,102)">Regards,</b><div><b style="color:rgb(102,102,102)">Romil <br></b><br></div></div>
</div>