Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
setuptools.tests.server.IndexServer Class Reference
Inheritance diagram for setuptools.tests.server.IndexServer:

Public Member Functions

def __init__
 
def serve
 
def start
 
def stop
 
def base_url
 

Public Attributes

 thread
 

Private Attributes

 _run
 

Detailed Description

Basic single-threaded http server simulating a package index

You can use this server in unittest like this::
    s = IndexServer()
    s.start()
    index_url = s.base_url() + 'mytestindex'
    # do some test requests to the index
    # The index files should be located in setuptools/tests/indexes
    s.stop()

Constructor & Destructor Documentation

def setuptools.tests.server.IndexServer.__init__ (   self,
  server_address = ('', 0,
  RequestHandlerClass = SimpleHTTPRequestHandler 
)

Member Function Documentation

def setuptools.tests.server.IndexServer.base_url (   self)
def setuptools.tests.server.IndexServer.serve (   self)
def setuptools.tests.server.IndexServer.start (   self)
def setuptools.tests.server.IndexServer.stop (   self)

Member Data Documentation

setuptools.tests.server.IndexServer._run
private
setuptools.tests.server.IndexServer.thread

The documentation for this class was generated from the following file:

Copyright 2014 Google Inc. All rights reserved.