예제 #1
0
 def test_read(self):
     s = EncodedTextSpec('name')
     f = Frame()
     f.encoding = 0
     header = ID3Header()
     header.version = (2, 4, 0)
     self.assertEquals((u'abcd', b'fg'), s.read(header, f, b'abcd\x00fg'))
예제 #2
0
 def test_read(self):
     s = EncodedTextSpec('name')
     f = Frame()
     f.encoding = 0
     header = ID3Header()
     header.version = (2, 4, 0)
     self.assertEquals((u'abcd', b'fg'), s.read(header, f, b'abcd\x00fg'))
예제 #3
0
 def test_write(self):
     s = EncodedTextSpec('name')
     f = Frame()
     f.encoding = 0
     self.assertEquals(b'abcdefg\x00', s.write(None, f, u'abcdefg'))
     self.assertRaises(AttributeError, s.write, None, f, None)
예제 #4
0
 def test_read(self):
     s = EncodedTextSpec('name')
     f = Frame()
     f.encoding = 0
     self.assertEquals((u'abcd', b'fg'), s.read(None, f, b'abcd\x00fg'))
예제 #5
0
 def test_write(self):
     s = EncodedTextSpec('name')
     f = Frame()
     f.encoding = 0
     self.assertEquals(b'abcdefg\x00', s.write(None, f, u'abcdefg'))
     self.assertRaises(AttributeError, s.write, None, f, None)
예제 #6
0
 def test_read(self):
     s = EncodedTextSpec('name')
     f = Frame()
     f.encoding = 0
     self.assertEquals((u'abcd', b'fg'), s.read(None, f, b'abcd\x00fg'))