1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3 <html><head><title>Python: module telemetry.unittest.simple_mock</title> 4 </head><body bgcolor="#f0f0f8"> 5 6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 7 <tr bgcolor="#7799ee"> 8 <td valign=bottom> <br> 9 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.unittest.html"><font color="#ffffff">unittest</font></a>.simple_mock</strong></big></big></font></td 10 ><td align=right valign=bottom 11 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/unittest/simple_mock.py">telemetry/unittest/simple_mock.py</a></font></td></tr></table> 12 <p><tt>A very very simple mock <a href="__builtin__.html#object">object</a> harness.</tt></p> 13 <p> 14 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 15 <tr bgcolor="#ee77aa"> 16 <td colspan=3 valign=bottom> <br> 17 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 18 19 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 20 <td width="100%"><dl> 21 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 22 </font></dt><dd> 23 <dl> 24 <dt><font face="helvetica, arial"><a href="telemetry.unittest.simple_mock.html#MockFunctionCall">MockFunctionCall</a> 25 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.simple_mock.html#MockObject">MockObject</a> 26 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.unittest.simple_mock.html#MockTrace">MockTrace</a> 27 </font></dt></dl> 28 </dd> 29 </dl> 30 <p> 31 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 32 <tr bgcolor="#ffc8d8"> 33 <td colspan=3 valign=bottom> <br> 34 <font color="#000000" face="helvetica, arial"><a name="MockFunctionCall">class <strong>MockFunctionCall</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> 35 36 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 37 <td width="100%">Methods defined here:<br> 38 <dl><dt><a name="MockFunctionCall-VerifyEquals"><strong>VerifyEquals</strong></a>(self, got)</dt></dl> 39 40 <dl><dt><a name="MockFunctionCall-WhenCalled"><strong>WhenCalled</strong></a>(self, handler)</dt></dl> 41 42 <dl><dt><a name="MockFunctionCall-WillReturn"><strong>WillReturn</strong></a>(self, value)</dt></dl> 43 44 <dl><dt><a name="MockFunctionCall-WithArgs"><strong>WithArgs</strong></a>(self, *args)</dt></dl> 45 46 <dl><dt><a name="MockFunctionCall-__init__"><strong>__init__</strong></a>(self, name)</dt></dl> 47 48 <dl><dt><a name="MockFunctionCall-__repr__"><strong>__repr__</strong></a>(self)</dt></dl> 49 50 <hr> 51 Data descriptors defined here:<br> 52 <dl><dt><strong>__dict__</strong></dt> 53 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 54 </dl> 55 <dl><dt><strong>__weakref__</strong></dt> 56 <dd><tt>list of weak references to the object (if defined)</tt></dd> 57 </dl> 58 </td></tr></table> <p> 59 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 60 <tr bgcolor="#ffc8d8"> 61 <td colspan=3 valign=bottom> <br> 62 <font color="#000000" face="helvetica, arial"><a name="MockObject">class <strong>MockObject</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> 63 64 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 65 <td width="100%">Methods defined here:<br> 66 <dl><dt><a name="MockObject-ExpectCall"><strong>ExpectCall</strong></a>(self, func_name, *args)</dt></dl> 67 68 <dl><dt><a name="MockObject-__init__"><strong>__init__</strong></a>(self, parent_mock<font color="#909090">=None</font>)</dt></dl> 69 70 <dl><dt><a name="MockObject-__setattr__"><strong>__setattr__</strong></a>(self, name, value)</dt></dl> 71 72 <hr> 73 Data descriptors defined here:<br> 74 <dl><dt><strong>__dict__</strong></dt> 75 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 76 </dl> 77 <dl><dt><strong>__weakref__</strong></dt> 78 <dd><tt>list of weak references to the object (if defined)</tt></dd> 79 </dl> 80 </td></tr></table> <p> 81 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 82 <tr bgcolor="#ffc8d8"> 83 <td colspan=3 valign=bottom> <br> 84 <font color="#000000" face="helvetica, arial"><a name="MockTrace">class <strong>MockTrace</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> 85 86 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 87 <td width="100%">Methods defined here:<br> 88 <dl><dt><a name="MockTrace-__init__"><strong>__init__</strong></a>(self)</dt></dl> 89 90 <hr> 91 Data descriptors defined here:<br> 92 <dl><dt><strong>__dict__</strong></dt> 93 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 94 </dl> 95 <dl><dt><strong>__weakref__</strong></dt> 96 <dd><tt>list of weak references to the object (if defined)</tt></dd> 97 </dl> 98 </td></tr></table></td></tr></table><p> 99 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 100 <tr bgcolor="#55aa55"> 101 <td colspan=3 valign=bottom> <br> 102 <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> 103 104 <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> 105 <td width="100%"><strong>DONT_CARE</strong> = ''</td></tr></table> 106 </body></html>