1
# Copyright (C) 2004 Anthony Baxter
2
"""Tests for shtoom.audio.playout
5
from twisted.trial import unittest
6
from shtoom.audio.playout import BrainDeadPlayout, BacklogPlayout, Playout, _Playout
7
from shtoom.rtp.packets import RTPPacket
9
class BrainDeadPlayoutTests(unittest.TestCase):
11
def test_playout_ctor(self):
13
b = BrainDeadPlayout()
14
a_(isinstance(b, _Playout))
16
a_(isinstance(b, _Playout))
18
def test_braindead(self):
19
ae = self.assertEquals
20
p = BrainDeadPlayout()
61
def test_playout_packets(self):
62
"Test with RTP Packets"
64
ae = self.assertEquals
65
for playout in ( BrainDeadPlayout, BacklogPlayout ):
71
p = RTPPacket(0, seq, ts, '')
77
p.write('1',pg.next())
78
p.write('2',pg.next())
79
raise unittest.SkipTest('fix later')
84
p.write('3',pg.next())
85
p.write('4',pg.next())
86
p.write('5',pg.next())
87
p.write('6',pg.next())
91
p.write('7',pg.next())
93
p.write('8',pg.next())
95
p.write('9',pg.next())
99
p.write('1',pg.next())
100
p.write('',pg.next())
102
p.write('2',pg.next())
107
p.write('1',pg.next())
109
p.write('2',pg.next())
111
p.write('3',pg.next())
113
p.write('4',pg.next())