Skip to content

Commit 0311e4e

Browse files
committed
Bugfixing tests. They fail with error: InvocationError. My guess is that "from six import string_types" could be faulty line in one test (TOXENV=isort).
1 parent 90a9ff2 commit 0311e4e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
3-
from six import string_types
43

54
import sys
65
import unittest
@@ -108,11 +107,11 @@ def test_get_totp_digits(self):
108107
def test_random_hex(self):
109108
# test that returned random_hex_str is string
110109
h = random_hex_str()
111-
self.assertIsInstance(h, string_types)
110+
self.assertIsInstance(h, six.string_types)
112111
# hex string must be 40 characters long. If cannot be longer, because CharField max_length=40
113112
self.assertEqual(len(h), 40)
114113

115114
# Added tests to verify that we can safely remove IF statement from random_hex_str function
116115
hh = random_hex().decode('utf-8')
117-
self.assertIsInstance(hh, string_types)
116+
self.assertIsInstance(hh, six.string_types)
118117
self.assertEqual(len(hh), 40)

0 commit comments

Comments
 (0)