Pulling in improvements from Dialcentral
[ejpi] / src / libraries / recipes / test_utils.py
index d238bfa..a2da797 100644 (file)
@@ -113,8 +113,8 @@ def expected(exception):
        """
        if isinstance(exception, Exception):
                excType, excValue = type(exception), str(exception)
-       elif isinstance(e, type):
-               excType, excValue = e, ""
+       elif isinstance(exception, type):
+               excType, excValue = exception, ""
 
        try:
                yield
@@ -127,4 +127,4 @@ def expected(exception):
 
 if __name__ == "__main__":
        import doctest
-       doctest.testmod()
\ No newline at end of file
+       doctest.testmod()