Esempio n. 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'))
Esempio n. 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'))
Esempio n. 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)
Esempio n. 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'))
Esempio n. 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)
Esempio n. 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'))