TestMocker¶
-
class
tests.general.test_mocker.
TestMocker
(methodName='runTest')[source]¶ -
__init__
(methodName='runTest') Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
-
Methods¶
Methods
Set an attribute on a Mocker instance and confirm we can retrieve it again |
|
Set an item on a Mocker instance and confirm we can retrieve it again |
|
Set an attribute and item on a Mocker instance and confirm both can be accessed as items or attributes |
|
Create a “disguised” Mocker class and confirm the class name is correct |
|
Create a “disguised” Mocker class with a custom module and confirm the class name + module is correct |
|
Create two “disguised” mocker classes and confirm both instances have independent class names/modules |
|
Create a “disguised” Mocker class with instance=False and confirm it’s a class, not an instance |