Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 93c0301

Browse files
committed
Add verbose output tests and fix py2 tests
1 parent 5b1e85a commit 93c0301

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ help:
4949
@echo " make publish Publish ${PACKAGE_NAME} package on PyPi"
5050

5151
test-unit:
52-
pytest -m unit
52+
pytest -v -m unit
5353

5454
test-integration:
55-
pytest -m integration
55+
pytest -v -m integration
5656

5757
test-remote: prepare
5858
python ${REMOTE_TEST_SETUP_NAME} pytest -m integration

tests/test_handshake.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ def test_prepare_auth_request(self):
198198
self.handshake._random_nonce = base64.encodebytes(b'random_nonce') if six.PY3 else base64.b64encode(b'random_nonce')
199199
self.handshake._first_client_message = chain_to_bytes('n=', self.handshake._username, ',r=', self.handshake._random_nonce)
200200
response = {'success': True, 'authentication': 's=cmFuZG9tX25vbmNl\n,i=2,r=cmFuZG9tX25vbmNl\n'}
201-
expected_result = b'{"authentication": "c=biws,r=cmFuZG9tX25vbmNl\\n,p=2Tpd60LM4Tkhe7VATTPj/lh4yunl07Sm4A+m3ukC774="}\x00'
201+
if six.PY3:
202+
expected_result = b'{"authentication": "c=biws,r=cmFuZG9tX25vbmNl\\n,p=2Tpd60LM4Tkhe7VATTPj/lh4yunl07Sm4A+m3ukC774="}\x00'
203+
else:
204+
expected_result = b'{"authentication": "c=biws,r=cmFuZG9tX25vbmNl\\n,p=JqVP98bzu3yye/3SLopNJvCRimBx34uKI/EY8UI41gM="}\x00'
202205

203206
result = self.handshake._prepare_auth_request(json.dumps(response))
204207

0 commit comments

Comments
 (0)