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

Merge pull request #78 from mshytikov/feature/cassette-all-played

Feature/Cassette#all_played
This commit is contained in:
Kevin McCarthy
2014-05-10 11:58:28 -10:00
4 changed files with 31 additions and 1 deletions

View File

@@ -60,6 +60,13 @@ class Cassette(ContextDecorator):
def play_count(self):
return sum(self.play_counts.values())
@property
def all_played(self):
"""
Returns True if all responses have been played, False otherwise.
"""
return self.play_count == len(self)
@property
def requests(self):
return [request for (request, response) in self.data]