1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-10 09:35:34 +00:00

add str to cassette object

This commit is contained in:
Kevin McCarthy
2013-08-07 21:47:53 -10:00
parent ac2f21b318
commit 5d1c1ecc92

View 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)