mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 09:13:23 +00:00
add a couple more tests, change played api to require request being played
This commit is contained in:
@@ -26,8 +26,17 @@ def test_cassette_not_played():
|
||||
|
||||
def test_cassette_played():
|
||||
a = Cassette('test')
|
||||
a.mark_played()
|
||||
assert a.play_count == 1
|
||||
a.mark_played('foo')
|
||||
a.mark_played('foo')
|
||||
assert a.play_count == 2
|
||||
|
||||
def test_cassette_play_counter():
|
||||
a = Cassette('test')
|
||||
a.mark_played('foo')
|
||||
a.mark_played('bar')
|
||||
assert a.play_counts['foo'] == 1
|
||||
assert a.play_counts['bar'] == 1
|
||||
|
||||
|
||||
def test_cassette_append():
|
||||
a = Cassette('test')
|
||||
|
||||
@@ -48,7 +48,7 @@ class Cassette(object):
|
||||
def play_count(self):
|
||||
return sum(self.play_counts.values())
|
||||
|
||||
def mark_played(self, request=None):
|
||||
def mark_played(self, request):
|
||||
'''
|
||||
Alert the cassette of a request that's been played
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user