<div dir="ltr">Sorry, email went to spam. Just saw it.<div>Following is link</div><div><a href="http://paste.openstack.org/show/494403/">http://paste.openstack.org/show/494403/</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 18, 2016 at 8:41 AM, joehuang <span dir="ltr"><<a href="mailto:joehuang@huawei.com" target="_blank">joehuang@huawei.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="ZH-CN" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi, Khayam,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Could you paste your whole file for test cases and the source code to be tested in the
<a href="http://paste.openstack.org/" target="_blank">http://paste.openstack.org/</a> seperatly.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Please share the links, so that to find out what happened.<u></u><u></u></span></p><span class="">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Best Regards<u></u><u></u></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Chaoyi Huang ( Joe Huang )</span><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
</span><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Khayam Gondal [mailto:<a href="mailto:khayam.gondal@gmail.com" target="_blank">khayam.gondal@gmail.com</a>]
<br>
<b>Sent:</b> Thursday, April 14, 2016 5:30 PM<br>
<b>To:</b> joehuang<br>
<b>Cc:</b> OpenStack Development Mailing List (not for usage questions); Zhiyuan Cai<br>
<b>Subject:</b> Re: [Tricircle] Error runnig py27<u></u><u></u></span></p>
</div><div><div class="h5">
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi joehuang,<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">by removing self it is showing following error.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"> File "/home/khayam/tricircle/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1206, in _importer<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> thing = __import __ (import_path)<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Import Error: No module named app<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Ran 135 tests in 2.994s (+ 0.940s)<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">On Thu, Apr 14, 2016 at 5:53 AM, joehuang <<a href="mailto:joehuang@huawei.com" target="_blank">joehuang@huawei.com</a>> wrote:<u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">Hi, Khayam,
</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">@</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:#0000b2">mock.patch</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">(</span><b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:green">'self.app.post_json'</span></b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">)</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">No “self.” needed.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph">
<span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Best Regards</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph">
<span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Chaoyi Huang ( Joe Huang )</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Khayam
Gondal [mailto:<a href="mailto:khayam.gondal@gmail.com" target="_blank">khayam.gondal@gmail.com</a>]
<br>
<b>Sent:</b> Wednesday, April 13, 2016 2:50 PM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Cc:</b> joehuang; Zhiyuan Cai<br>
<b>Subject:</b> [Tricircle] Error runnig py27</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi I am writing a test for exception . Following is my testing function.<u></u><u></u></span></p>
<div>
<pre><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">@</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:#0000b2">mock.patch</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">(</span><b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:green">'self.app.post_json'</span></b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">)<br></span><b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:navy">def </span></b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">test_post_exp(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:#94558d">self</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">, mock_get, mock_http_error_handler):<br><br> mock_response = mock.Mock()<br> mock_response.raise_for_status.side_effect = db_exc.DBDuplicateEntry<br> mock_get.return_value = mock_response<br> mock_http_error_handler.side_effect = db_exc.DBDuplicateEntry<br> </span><b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:navy">with </span></b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:#94558d">self</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">.assertRaise(db_exc.DBDuplicateEntry):<br> </span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:#94558d">self</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">.app.post_json(<br> </span><b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:green">'/v1.0/pods'</span></b><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">,<br> </span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:navy">dict</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:#660099">pod</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:navy">None</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">),<br> </span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:#660099">expect_errors</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:navy">True</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Courier New";color:black">)</span><span lang="EN-US"><u></u><u></u></span></pre>
<pre><span lang="EN-US" style="font-family:"Arial","sans-serif";color:#222222">But when I run tox -epy27 it shows: </span><span lang="EN-US"><u></u><u></u></span></pre>
<pre><span lang="EN-US" style="font-family:"Arial","sans-serif""> <b> File "/home/khayam/tricircle/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1206, in _importer</b></span><span lang="EN-US"><u></u><u></u></span></pre>
<pre><b><span lang="EN-US" style="font-family:"Arial","sans-serif""> thing = __import__(import_path)</span></b><span lang="EN-US"><u></u><u></u></span></pre>
<pre><b><span lang="EN-US" style="font-family:"Arial","sans-serif"">ImportError: No module named self</span></b><span lang="EN-US"><u></u><u></u></span></pre>
<pre><span lang="EN-US" style="font-family:"Arial","sans-serif"">Can someone guide me whats wrong here. I already had installed latest version of mock, python-dev. </span><span lang="EN-US"><u></u><u></u></span></pre>
<div>
<pre><span lang="EN-US" style="font-family:"Arial","sans-serif";color:#222222"> </span><span lang="EN-US"><u></u><u></u></span></pre>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>