mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-10 17:20:29 +03:00
update test: replace decode('hex') with unhexlify
This commit is contained in:
parent
5c40e3ab99
commit
a51d849a5b
1 changed files with 2 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import optparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
from binascii import unhexlify
|
||||||
|
|
||||||
localmodule = os.path.realpath(
|
localmodule = os.path.realpath(
|
||||||
os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..'))
|
os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..'))
|
||||||
|
|
@ -55,7 +56,7 @@ class UpdateTest(unittest.TestCase):
|
||||||
self.assertEquals(len(sig), len(pysig),
|
self.assertEquals(len(sig), len(pysig),
|
||||||
"the length of the two sigs are different!")
|
"the length of the two sigs are different!")
|
||||||
try:
|
try:
|
||||||
self.assertEquals(sig.decode('hex'), pysig.decode('hex'),
|
self.assertEquals(unhexlify(sig), unhexlify(pysig),
|
||||||
"the length of the two sigs are different!")
|
"the length of the two sigs are different!")
|
||||||
except TypeError as e:
|
except TypeError as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue