/usr/share/doc/python-gdata-doc/pydocs/gdata.test_config.html is in python-gdata-doc 2.0.18+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module gdata.test_config</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="gdata.html"><font color="#ffffff">gdata</font></a>.test_config</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/lib/python2.7/dist-packages/gdata/test_config.py">/usr/lib/python2.7/dist-packages/gdata/test_config.py</a></font></td></tr></table>
<p><tt># Copyright (C) 2009 Google Inc.<br>
#<br>
# Licensed under the Apache License, Version 2.0 (the "License");<br>
# you may not use this file except in compliance with the License.<br>
# You may obtain a copy of the License at<br>
#<br>
# <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a><br>
#<br>
# Unless required by applicable law or agreed to in writing, software<br>
# distributed under the License is distributed on an "AS IS" BASIS,<br>
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br>
# See the License for the specific language governing permissions and<br>
# limitations under the License.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="atom.html">atom</a><br>
<a href="gdata.html">gdata</a><br>
</td><td width="25%" valign=top><a href="getpass.html">getpass</a><br>
<a href="inspect.html">inspect</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
<a href="unittest.html">unittest</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gdata.test_config.html#ConfigCollection">ConfigCollection</a>
</font></dt><dt><font face="helvetica, arial"><a href="gdata.test_config.html#Option">Option</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="ConfigCollection">class <strong>ConfigCollection</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="ConfigCollection-__init__"><strong>__init__</strong></a>(self, options<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="ConfigCollection-get_value"><strong>get_value</strong></a>(self, option_name)</dt></dl>
<dl><dt><a name="ConfigCollection-register"><strong>register</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="ConfigCollection-register_option"><strong>register_option</strong></a>(self, option)</dt></dl>
<dl><dt><a name="ConfigCollection-render_usage"><strong>render_usage</strong></a>(self)</dt></dl>
<dl><dt><a name="ConfigCollection-set_value"><strong>set_value</strong></a>(self, option_name, value)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Option">class <strong>Option</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Option-__init__"><strong>__init__</strong></a>(self, name, prompt, secret<font color="#909090">=False</font>, description<font color="#909090">=None</font>, default<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Option-get"><strong>get</strong></a>(self)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-build_suite"><strong>build_suite</strong></a>(classes)</dt><dd><tt>Creates a TestSuite for all unit test classes in the list.<br>
<br>
Assumes that each of the classes in the list has unit test methods which<br>
begin with 'test'. Calls unittest.makeSuite.<br>
<br>
Returns: <br>
A new unittest.TestSuite containing a test suite for all classes.</tt></dd></dl>
<dl><dt><a name="-check_clients_with_auth"><strong>check_clients_with_auth</strong></a>(test, classes)</dt></dl>
<dl><dt><a name="-check_data_classes"><strong>check_data_classes</strong></a>(test, classes)</dt></dl>
<dl><dt><a name="-close_client"><strong>close_client</strong></a>(client)</dt><dd><tt>Saves the recoded responses to a temp file if the config file allows.<br>
<br>
This should be called in the unit test's tearDown method.<br>
<br>
Checks to see if the 'savecache' option is set to 'true', to make sure we<br>
only save sessions to repeat if the user desires.</tt></dd></dl>
<dl><dt><a name="-close_service"><strong>close_service</strong></a>(service)</dt></dl>
<dl><dt><a name="-configure_cache"><strong>configure_cache</strong></a>(client, test_name)</dt><dd><tt>Loads or begins a cached session to record HTTP traffic.<br>
<br>
Should be called at the beginning of each test method.<br>
<br>
Args:<br>
client: a gdata.GDClient whose http_client member has been replaced<br>
with a atom.mock_http_core.MockHttpClient so that repeated<br>
executions can used cached responses instead of contacting<br>
the server.<br>
test_name: str The name of this test method. Examples: <br>
'TestClass.test_x_works', 'TestClass.test_crud_operations'.<br>
This is used to name the recording of the HTTP requests and<br>
responses, so it should be unique to each test method in the<br>
test case.</tt></dd></dl>
<dl><dt><a name="-configure_client"><strong>configure_client</strong></a>(client, case_name, service_name, use_apps_auth<font color="#909090">=False</font>)</dt><dd><tt>Sets up a mock client which will reuse a saved session.<br>
<br>
Should be called during setUp of each unit test.<br>
<br>
Handles authentication to allow the GDClient to make requests which<br>
require an auth header.<br>
<br>
Args:<br>
client: a gdata.GDClient whose http_client member should be replaced<br>
with a atom.mock_http_core.MockHttpClient so that repeated<br>
executions can used cached responses instead of contacting<br>
the server.<br>
case_name: str The name of the test case class. Examples: 'BloggerTest',<br>
'ContactsTest'. Used to save a session<br>
for the ClientLogin auth token request, so the case_name<br>
should be reused if and only if the same username, password,<br>
and service are being used.<br>
service_name: str The service name as used for ClientLogin to identify<br>
the Google Data API being accessed. Example: 'blogger',<br>
'wise', etc.<br>
use_apps_auth: bool (optional) If set to True, use appsusername and<br>
appspassword command-line args instead of username and<br>
password respectively.</tt></dd></dl>
<dl><dt><a name="-configure_service"><strong>configure_service</strong></a>(service, case_name, service_name)</dt><dd><tt>Sets up a mock GDataService v1 client to reuse recorded sessions.<br>
<br>
Should be called during setUp of each unit test. This is a duplicate of<br>
configure_client, modified to handle old v1 service classes.</tt></dd></dl>
<dl><dt><a name="-configure_service_cache"><strong>configure_service_cache</strong></a>(service, test_name)</dt><dd><tt>Loads or starts a session recording for a v1 Service <a href="__builtin__.html#object">object</a>.<br>
<br>
Duplicates the behavior of configure_cache, but the target for this<br>
function is a v1 Service <a href="__builtin__.html#object">object</a> instead of a v2 Client.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>APPS_DOMAIN_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>BLOG_ID_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>GA_TABLE_ID</strong> = <gdata.test_config.Option object><br>
<strong>ISSUE_ASSIGNEE_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>PROJECT_NAME_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>SITES_NAME_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>SPREADSHEET_ID_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>TARGET_USERNAME_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>TEST_IMAGE_LOCATION_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>YT_CLIENT_ID_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>YT_DEVELOPER_KEY_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>YT_VIDEO_ID_OPTION</strong> = <gdata.test_config.Option object><br>
<strong>options</strong> = <gdata.test_config.ConfigCollection object></td></tr></table>
</body></html>
|