Explicitly specify encoding.

The default encoding is utf-8, which is what we want, but it's confusing
not to specify it.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
brian m. carlson 2014-07-16 23:18:20 +00:00
parent d615f6b2e7
commit 000ca6c1a1
No known key found for this signature in database
GPG key ID: BF535D811F52F68B

View file

@ -132,7 +132,7 @@ class SHA256TransactionTest(unittest.TestCase):
self.testcases = ["", "abc", "©", "\ufeff"]
def generate_len_and_hash(self, func, data):
s = data.encode()
s = data.encode('utf-8')
h = func()
h.update(s)
return "%s:%s" % (len(s), h.hexdigest())