def testStringToByteArrayNumericOnlyAscii(self):
     testVal = 'abcdefg01234'
     result = DecodeFunctions.stringToIntList(testVal, 'ascii')
     self.assertEqual([
         0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x30, 0x31, 0x32, 0x33,
         0x34
     ], result)
 def testStringToByteArrayAlphaOnlyAscii(self):
     testVal = 'abcdefghijklmn'
     result = DecodeFunctions.stringToIntList(testVal, 'ascii')
     self.assertEqual([
         0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B,
         0x6C, 0x6D, 0x6E
     ], result)
 def testStringToByteArrayAlphaOnlyUtf8(self):
     testVal = 'abcdefg'
     result = DecodeFunctions.stringToIntList(testVal, 'utf-8')
     self.assertEqual([0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67], result)