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