]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
add str to cassette object
authorKevin McCarthy <me@kevinmccarthy.org>
Thu, 8 Aug 2013 07:47:53 +0000 (21:47 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Mon, 12 Aug 2013 01:05:41 +0000 (15:05 -1000)
vcr/cassette.py

index 3c22c5b7a58db8b76ac09ab27bb0616519d6db7f..3443f916cadb2a7f6dcc4bbc3f99e360bcc6c47f 100644 (file)
@@ -62,6 +62,9 @@ class Cassette(object):
         '''Find the response corresponding to a request'''
         return self.requests[request]
 
+    def __str__(self):
+        return "<Cassette containing {0} recorded response(s)>".format(len(self))
+
     def __len__(self):
         '''Return the number of request / response pairs stored in here'''
         return len(self.requests)