Fix DeprecationWarnings in tests.

This commit is contained in:
William Grant
2011-06-02 19:12:49 +10:00
parent d9e3b49a8e
commit 30bf1bc171
2 changed files with 15 additions and 15 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ def read_test_data(filename):
The files live in dkim/tests/data.
"""
path = os.path.join(os.path.dirname(__file__), 'data', filename)
return open(path, 'rb').read()
with open(path, 'rb') as f:
return f.read()
class TestFold(unittest.TestCase):