Commit 15377316 authored by Neal Norwitz's avatar Neal Norwitz

Use attributes appropriately

parent 0040dd45
...@@ -63,7 +63,7 @@ class SanityTestCase(unittest.TestCase): ...@@ -63,7 +63,7 @@ class SanityTestCase(unittest.TestCase):
dig = h.hexdigest() dig = h.hexdigest()
h2 = h.copy() h2 = h.copy()
except: except:
fail("Exception raised during normal usage of HMAC class.") self.fail("Exception raised during normal usage of HMAC class.")
class CopyTestCase(unittest.TestCase): class CopyTestCase(unittest.TestCase):
def test_attributes(self): def test_attributes(self):
......
...@@ -8,7 +8,7 @@ class FakeSocket: ...@@ -8,7 +8,7 @@ class FakeSocket:
def makefile(self, mode, bufsize=None): def makefile(self, mode, bufsize=None):
if mode != 'r' and mode != 'rb': if mode != 'r' and mode != 'rb':
raise UnimplementedFileMode() raise httplib.UnimplementedFileMode()
return StringIO.StringIO(self.text) return StringIO.StringIO(self.text)
# Test HTTP status lines # Test HTTP status lines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment