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:
parent
d615f6b2e7
commit
000ca6c1a1
1 changed files with 1 additions and 1 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue