def test_base64_string_to_byte_array(self): inp = 'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' expected = bytearray('I\'m killing your brain like a poisonous mushroom') out = EncodingUtils.base64_string_to_byte_array(inp) self.assertEqual(out, expected)
def test_base64_string_to_byte_array(self): inp = 'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' expected = bytearray( 'I\'m killing your brain like a poisonous mushroom') out = EncodingUtils.base64_string_to_byte_array(inp) self.assertEqual(out, expected)