~gholt/swift/timeout_baseexception

« back to all changes in this revision

Viewing changes to test/unit/__init__.py

  • Committer: Tarmac
  • Author(s): David Goetz
  • Date: 2011-03-29 20:19:09 UTC
  • mfrom: (238.3.11 obj_server_0b_check)
  • Revision ID: tarmac-20110329201909-jvhx1i93pvg8gn6f
Check the md5sum against metadata ETag on object GETs, and zero byte checks on GETs, HEADs, and POSTs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        rmtree(tempdir)
92
92
 
93
93
 
 
94
class FakeLogger(object):
 
95
    # a thread safe logger
 
96
 
 
97
    def __init__(self):
 
98
        self.log_dict = dict(error=[], info=[], warning=[])
 
99
 
 
100
    def error(self, *args, **kwargs):
 
101
        self.log_dict['error'].append((args, kwargs))
 
102
 
 
103
    def info(self, *args, **kwargs):
 
104
        self.log_dict['info'].append((args, kwargs))
 
105
 
 
106
    def warning(self, *args, **kwargs):
 
107
        self.log_dict['warning'].append((args, kwargs))
 
108
 
 
109
 
94
110
class MockTrue(object):
95
111
    """
96
112
    Instances of MockTrue evaluate like True