Changeset 11410
- Timestamp:
- Mar 22, 2012, 9:15:22 PM (8 years ago)
- Location:
- xmlrpcplugin/trunk/tracrpc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
xmlrpcplugin/trunk/tracrpc/tests/api.py
r7916 r11410 37 37 self.assertEquals(e.fp.read(), 38 38 "No protocol matching Content-Type 'text/plain' at path '/rpc'.") 39 40 def test_rpc_info(self): 41 # Just try getting the docs for XML-RPC to test, it should always exist 42 from tracrpc.xml_rpc import XmlRpcProtocol 43 xmlrpc = XmlRpcProtocol(rpc_testenv.get_trac_environment()) 44 name, docs = xmlrpc.rpc_info() 45 self.assertEquals(name, 'XML-RPC') 46 self.assertTrue('Content-Type: application/xml' in docs) 39 47 40 48 def test_valid_provider(self): -
xmlrpcplugin/trunk/tracrpc/util.py
r7916 r11410 47 47 def prepare_docs(text, indent=4): 48 48 r"""Remove leading whitespace""" 49 return ''.join(l[indent:] for l in text.splitlines(True))49 return text and ''.join(l[indent:] for l in text.splitlines(True)) or '' 50 50 51 51 try:
Note: See TracChangeset
for help on using the changeset viewer.