PyOTP 2.5.0__tar.gz → 2.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: pyotp
3
- Version: 2.5.0
3
+ Version: 2.5.1
4
4
  Summary: Python One Time Password Library
5
5
  Home-page: https://github.com/pyotp/pyotp
6
6
  Author: PyOTP contributors
@@ -7,7 +7,7 @@ install_requires = [line.rstrip() for line in open(os.path.join(os.path.dirname(
7
7
 
8
8
  setup(
9
9
  name="pyotp",
10
- version="2.5.0",
10
+ version="2.5.1",
11
11
  url="https://github.com/pyotp/pyotp",
12
12
  license="MIT License",
13
13
  author="PyOTP contributors",
@@ -82,7 +82,7 @@ def parse_uri(uri: str) -> OTP:
82
82
  otp_data['interval'] = int(value)
83
83
  elif key == 'counter':
84
84
  otp_data['initial_count'] = int(value)
85
- else:
85
+ elif key != 'image':
86
86
  raise ValueError('{} is not a valid parameter'.format(key))
87
87
 
88
88
  if not secret:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: pyotp
3
- Version: 2.5.0
3
+ Version: 2.5.1
4
4
  Summary: Python One Time Password Library
5
5
  Home-page: https://github.com/pyotp/pyotp
6
6
  Author: PyOTP contributors
@@ -417,6 +417,10 @@ class ParseUriTest(unittest.TestCase):
417
417
  with self.assertRaises(ValueError):
418
418
  otp.provisioning_uri(name='n', issuer_name='i', image='nourl')
419
419
 
420
+ otp = pyotp.parse_uri(otp.provisioning_uri(name='n', issuer_name='i', image='https://test.net/test.png'))
421
+ self.assertEqual(hashlib.sha512, otp.digest)
422
+
423
+
420
424
  class Timecop(object):
421
425
  """
422
426
  Half-assed clone of timecop.rb, just enough to pass our tests.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes