2 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
3 <html><head><title>Python: module telemetry.testing.simple_mock
</title>
5 </head><body bgcolor=
"#f0f0f8">
7 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"heading">
9 <td valign=bottom
> <br>
10 <font color=
"#ffffff" face=
"helvetica, arial"> <br><big><big><strong><a href=
"telemetry.html"><font color=
"#ffffff">telemetry
</font></a>.
<a href=
"telemetry.testing.html"><font color=
"#ffffff">testing
</font></a>.simple_mock
</strong></big></big></font></td
11 ><td align=right valign=bottom
12 ><font color=
"#ffffff" face=
"helvetica, arial"><a href=
".">index
</a><br><a href=
"../telemetry/testing/simple_mock.py">telemetry/testing/simple_mock.py
</a></font></td></tr></table>
13 <p><tt>A
very
very
simple
mock
<a href=
"__builtin__.html#object">object
</a> harness.
</tt></p>
15 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
16 <tr bgcolor=
"#ee77aa">
17 <td colspan=
3 valign=bottom
> <br>
18 <font color=
"#ffffff" face=
"helvetica, arial"><big><strong>Classes
</strong></big></font></td></tr>
20 <tr><td bgcolor=
"#ee77aa"><tt> </tt></td><td> </td>
22 <dt><font face=
"helvetica, arial"><a href=
"__builtin__.html#object">__builtin__.object
</a>
25 <dt><font face=
"helvetica, arial"><a href=
"telemetry.testing.simple_mock.html#MockFunctionCall">MockFunctionCall
</a>
26 </font></dt><dt><font face=
"helvetica, arial"><a href=
"telemetry.testing.simple_mock.html#MockObject">MockObject
</a>
27 </font></dt><dt><font face=
"helvetica, arial"><a href=
"telemetry.testing.simple_mock.html#MockTimer">MockTimer
</a>
28 </font></dt><dt><font face=
"helvetica, arial"><a href=
"telemetry.testing.simple_mock.html#MockTrace">MockTrace
</a>
33 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
34 <tr bgcolor=
"#ffc8d8">
35 <td colspan=
3 valign=bottom
> <br>
36 <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>
38 <tr><td bgcolor=
"#ffc8d8"><tt> </tt></td><td> </td>
39 <td width=
"100%">Methods defined here:
<br>
40 <dl><dt><a name=
"MockFunctionCall-VerifyEquals"><strong>VerifyEquals
</strong></a>(self, got)
</dt></dl>
42 <dl><dt><a name=
"MockFunctionCall-WhenCalled"><strong>WhenCalled
</strong></a>(self, handler)
</dt></dl>
44 <dl><dt><a name=
"MockFunctionCall-WillReturn"><strong>WillReturn
</strong></a>(self, value)
</dt></dl>
46 <dl><dt><a name=
"MockFunctionCall-WithArgs"><strong>WithArgs
</strong></a>(self, *args)
</dt></dl>
48 <dl><dt><a name=
"MockFunctionCall-__init__"><strong>__init__
</strong></a>(self, name)
</dt></dl>
50 <dl><dt><a name=
"MockFunctionCall-__repr__"><strong>__repr__
</strong></a>(self)
</dt></dl>
53 Data descriptors defined here:
<br>
54 <dl><dt><strong>__dict__
</strong></dt>
55 <dd><tt>dictionary
for
instance
variables
(if
defined)
</tt></dd>
57 <dl><dt><strong>__weakref__
</strong></dt>
58 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
60 </td></tr></table> <p>
61 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
62 <tr bgcolor=
"#ffc8d8">
63 <td colspan=
3 valign=bottom
> <br>
64 <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>
66 <tr><td bgcolor=
"#ffc8d8"><tt> </tt></td><td> </td>
67 <td width=
"100%">Methods defined here:
<br>
68 <dl><dt><a name=
"MockObject-ExpectCall"><strong>ExpectCall
</strong></a>(self, func_name, *args)
</dt></dl>
70 <dl><dt><a name=
"MockObject-SetAttribute"><strong>SetAttribute
</strong></a>(self, name, value)
</dt></dl>
72 <dl><dt><a name=
"MockObject-__init__"><strong>__init__
</strong></a>(self, parent_mock
<font color=
"#909090">=None
</font>)
</dt></dl>
74 <dl><dt><a name=
"MockObject-__setattr__"><strong>__setattr__
</strong></a>(self, name, value)
</dt></dl>
77 Data descriptors defined here:
<br>
78 <dl><dt><strong>__dict__
</strong></dt>
79 <dd><tt>dictionary
for
instance
variables
(if
defined)
</tt></dd>
81 <dl><dt><strong>__weakref__
</strong></dt>
82 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
84 </td></tr></table> <p>
85 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
86 <tr bgcolor=
"#ffc8d8">
87 <td colspan=
3 valign=bottom
> <br>
88 <font color=
"#000000" face=
"helvetica, arial"><a name=
"MockTimer">class
<strong>MockTimer
</strong></a>(
<a href=
"__builtin__.html#object">__builtin__.object
</a>)
</font></td></tr>
90 <tr bgcolor=
"#ffc8d8"><td rowspan=
2><tt> </tt></td>
91 <td colspan=
2><tt>A
mock
timer
to
fake
out
the
timing
for
a
module.
<br>
93 module:
module
to
fake
out
the
time
<br> </tt></td></tr>
95 <td width=
"100%">Methods defined here:
<br>
96 <dl><dt><a name=
"MockTimer-Restore"><strong>Restore
</strong></a>(self)
</dt></dl>
98 <dl><dt><a name=
"MockTimer-SetTime"><strong>SetTime
</strong></a>(self, time)
</dt></dl>
100 <dl><dt><a name=
"MockTimer-__del__"><strong>__del__
</strong></a>(self)
</dt></dl>
102 <dl><dt><a name=
"MockTimer-__init__"><strong>__init__
</strong></a>(self, module
<font color=
"#909090">=None
</font>)
</dt></dl>
104 <dl><dt><a name=
"MockTimer-sleep"><strong>sleep
</strong></a>(self, time)
</dt></dl>
106 <dl><dt><a name=
"MockTimer-time"><strong>time
</strong></a>(self)
</dt></dl>
109 Data descriptors defined here:
<br>
110 <dl><dt><strong>__dict__
</strong></dt>
111 <dd><tt>dictionary
for
instance
variables
(if
defined)
</tt></dd>
113 <dl><dt><strong>__weakref__
</strong></dt>
114 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
116 </td></tr></table> <p>
117 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
118 <tr bgcolor=
"#ffc8d8">
119 <td colspan=
3 valign=bottom
> <br>
120 <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>
122 <tr><td bgcolor=
"#ffc8d8"><tt> </tt></td><td> </td>
123 <td width=
"100%">Methods defined here:
<br>
124 <dl><dt><a name=
"MockTrace-__init__"><strong>__init__
</strong></a>(self)
</dt></dl>
127 Data descriptors defined here:
<br>
128 <dl><dt><strong>__dict__
</strong></dt>
129 <dd><tt>dictionary
for
instance
variables
(if
defined)
</tt></dd>
131 <dl><dt><strong>__weakref__
</strong></dt>
132 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
134 </td></tr></table></td></tr></table><p>
135 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
136 <tr bgcolor=
"#55aa55">
137 <td colspan=
3 valign=bottom
> <br>
138 <font color=
"#ffffff" face=
"helvetica, arial"><big><strong>Data
</strong></big></font></td></tr>
140 <tr><td bgcolor=
"#55aa55"><tt> </tt></td><td> </td>
141 <td width=
"100%"><strong>DONT_CARE
</strong> = ''
</td></tr></table>