Hi All This maybe a VERY silly question So advanced apologies. But I am very confused with why I write this below
> from mock.mock import patch > instead of > from mock import patch > in all testcases of ambari-agent. I downloaded mock module from https://pypi.python.org/pypi/mock and installed it via python setup.py install. And then when I check for the module with below commands I find that > from mock.mock import patch FAILS !! # pydoc modules |grep mock > VBoxREM difflib mock sunaudio > # > # python > Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import mock > >>> > # python > Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import mock.mock > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: No module named mock > >>> > When I look at the testcase in ambari-agent All testcases have > from mock.mock import patch did I install mock module incorrectly or has everyone else installed it incorrectly. What am I doing wrong AND do mock or mock.mock ? -- ~Subin
