Changeset 444

Show
Ignore:
Timestamp:
Mon Feb 11 11:11:05 2008
Author:
djfroofy
Message:

- bump

Files:

Legend:

Unmodified
Added
Removed
Modified
  • subprojects/Wuming/trunk/wuming/test/test_auth.py

    r441 r444  
    28 28                 (200, {}, 'Hello 0'))  
    29 29      
    30       def test_second(self):  
    31           # Don't understand why this is failing or how to simulate this  
      30     def test_complex(self):  
      31         self.assertResponse(  
      32                 (self.root, 'http://host/'),  
      33                 (200, {}, 'Hello 0'))  
      34         self.assertResponse(  
      35                 (self.root, 'http://host/'),  
      36                 (200, {}, 'Hello 1'))  
      37         self.assertResponse(  
      38                 (self.root, 'http://host/'),  
      39                 (200, {}, 'Hello 2'))  
      40         return self.assertResponse(  
      41                 (self.root, 'http://host/', {'Cookie' : (http_headers.Cookie('nameless', '1'),)}),  
      42                 (200, {}, 'Hello 1'))  
    32 43         return self.assertResponse(  
    33                   #(self.root, 'http://host/', {'Cookie' : [http_headers.Cookie('nameless', '123', '/', 'host')]}),  
    34                   (self.root, 'http://host/', {'Cookie' : (http_headers.Cookie('nameless', '123'),)}),  
    35                   (200, {}, 'Hello 1')  
    36                   )  
      44                 (self.root, 'http://host/', {'Cookie' : (http_headers.Cookie('nameless', '0'),)}),  
      45                 (200, {}, 'Hello 0'))  
    37 46  
  • subprojects/Wuming/trunk/wuming/web.py

    r442 r444  
    135 135     from twisted.web2 import server, vhost, channel  
    136 136     from wuming.templates.wgenshi import GenshiTemplateLoader  
      137     import os.path  
      138     pj = os.path.join  
    137 139  
    138 140     class ATemplateResource(TemplateResource):  
     
    141 143  
    142 144     template = 'helloworld-jp.xhtml'  
    143       templateLoader = GenshiTemplateLoader(['wuming/data'])  
      145     templateLoader = GenshiTemplateLoader([pj('wuming', 'data')])  
    143 145     rsc = ATemplateResource(tpl_loader=templateLoader, template=template)  
    144 146     site = server.Site(rsc)  
  • subprojects/Wuming/trunk/wuming/auth.py

    r441 r444  
    81 81         """  
    82 82  
    83   class InMemoryIdStoreDontUse:  
      83 class InMemoryIdStoreDontUse(object):  
    83 83     """  
    84 84     >>> from zope.interface.verify import verifyClass, verifyObject  
  • subprojects/Wuming/trunk/wuming/interfaces.py

    r437 r444  
    1    
    2 1 from zope.interface import Interface, Attribute  
      2 from twisted.cred.portal import IRealm  
      3  
    3 4  
    4 5 class ITemplate(Interface):  
     
    83 84         """  
    84 85  
      86 class IAvatar(Interface):  
      87     """I am a container for avatars, which together comprise the session.  
      88     """  
      89     def getAvatars():  
      90         """I return the list of avatars I have.  
      91         """  
      92  
      93 class IAnonymousAvatar(IAvatar):  
      94     """Marker interface for an anonymous avatar  
      95     """  
      96  
      97 class IAuthenticatedAvatar(IAvatar):  
      98     """Marker interface for an authenticated avatar  
      99     """  
      100  
      101 class IMultiRealm(IRealm):  
      102     """A `special' realm which is pluggable with other realm interfaces.  
      103     You can register your own IRealm instance with the mutli-realm.  The realm  
      104     This should return an IAvatar provider on calls to getAvatar if at least one  
      105     interface can be provided.  In all conditions pass, the avatar will contain  
      106     all interfaces collected from each underlying realm.  
      107     """  
      108  
      109     realms = Attribute("""List of IRealms""")  
    85 110  
  • subprojects/Wuming/trunk/wuming/sshcmds.py

    r423 r444  
    99 99         self.loseConnection()  
    100 100  
      101  
      102 USAGE = "%s \"<command>\" user,host [user,host..|host..]" % sys.argv[0]  
      103  
    101 104 # Test  
    102 105 # USAGE python sshcmds.py logfile user,host,color ...  
     
    124 127         return _Data()  
    125 128     cmd = sys.argv[1]  
      129     curuser = None  
    126 130     for a in sys.argv[2:]:  
    127 131         tks = a.split(',')  
    128 132         if len(tks) == 3:  
    129 133             username,host,color = tks  
      134         elif len(tks) == 1:  
      135             if not curuser:  
      136                 print USAGE  
      137                 sys.exit(-1)  
      138             username,host = curuser,tks[0]  
      139             color = color_wheel[tile % len(color_wheel)]  
      140             tile += 1  
    130 141         else:  
    131 142             username,host = tks  
      143             curuser = username  
    132 144             color = color_wheel[tile % len(color_wheel)]  
    133 145             tile += 1  
  • subprojects/Wuming/trunk/setup.py

    r423 r444  
    14 14  
    15 15  
      16 VERSION="0.0.1"  
      17  
    16 18 setup(  
    17 19     author='Drew Smathers',  
    18 20     author_email='andrew.smathers@turner.com',  
    19 21     name='wuming',  
    20       version='0.0.0',  
      22     version=VERSION,  
    20 22     description='',  
    21       install_requires=['twisted', 'genshi==0.4.1'],  
      23     install_requires=['twisted', 'Genshi', "pycrypto", "xix-utils"],  
    21 23     url='http://xix.python-hosting.com/#wuming',  
    22 24     packages=['wuming', 'wuming.templates'],