Import mock.py 1.0.1 from http://www.voidspace.org.uk/python/mock/

mock is a library for testing in Python. It allows you to replace parts
of your system under test with mock objects and make assertions about
how they have been used.

mock is now part of the Python standard library, available as
`unittest.mock
<http://docs.python.org/py3k/library/unittest.mock.html#module-unittest.mock>`_
in Python 3.3 onwards.

Licensed under BSD-3-Clause.

Justification:

Since this particular mock library has been accepted in upstream Python 3.3 it
reflects community acceptance and suggests we should move towards using
this mock as a standard mock library for unittests.

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
client/shared/mock.py: disable pylint false positives

So that further pylint runs will not be verbose about them.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Add unittests for AsyncJob.  These tests use the stdlib unittest.mock
module backported from Python 3.3.

v2:
Unit tested on Windows, had to patch out resource, signal, and fcntl

Add patch for subprocess.Popen since Windows doesn't support the
preexec_fn parameter that is used in the BgJob __init__

Replace Thread MagicMock with a class since the MagicMock wasn't working
on Windows for some reason.

v3:
move mock to autotest.client.shared.mock, remove patch for resource,
signal, and fcnlt

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>