From: Daniel Martí Date: Mon, 4 Jan 2016 20:31:22 +0000 (+0100) Subject: update test: replace decode('hex') with unhexlify X-Git-Tag: 0.7.0~86^2~13 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a51d849a5b0c02e7528818fb4291c7f1542e42c1;p=fdroidserver.git update test: replace decode('hex') with unhexlify --- diff --git a/tests/update.TestCase b/tests/update.TestCase index 647c8d56..83349f5e 100755 --- a/tests/update.TestCase +++ b/tests/update.TestCase @@ -8,6 +8,7 @@ import optparse import os import sys import unittest +from binascii import unhexlify localmodule = os.path.realpath( os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..')) @@ -55,7 +56,7 @@ class UpdateTest(unittest.TestCase): self.assertEquals(len(sig), len(pysig), "the length of the two sigs are different!") try: - self.assertEquals(sig.decode('hex'), pysig.decode('hex'), + self.assertEquals(unhexlify(sig), unhexlify(pysig), "the length of the two sigs are different!") except TypeError as e: print(e)