Compatibility with Python < 2.5 - ValueError in older versions do not have a message attribute
diff --git a/test/test_rand.py b/test/test_rand.py
index 09056d7..05bf8c8 100644
--- a/test/test_rand.py
+++ b/test/test_rand.py
@@ -26,7 +26,7 @@
         b3 = rand.bytes(num_bytes=0) 
         self.assertEqual(len(b3), 0)
         exc = self.assertRaises(ValueError, rand.bytes, -1)
-        self.assertEqual(exc.message, "num_bytes must not be negative")
+        self.assertEqual(str(exc), "num_bytes must not be negative")
 
 
     def test_add(self):