Skip to content

Commit 9a0ad5b

Browse files
committed
Replace nosetests with pytest and update httpretty
1 parent 368164b commit 9a0ad5b

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from version import __version__
1212

1313
install_require = ['requests >= 2.7.0, < 3.0.0']
14-
tests_require = ['nose >= 1.3, < 2.0', 'httpretty >= 0.8.10, < 1.0.0']
14+
tests_require = ['pytest', 'httpretty < 1.1.5']
1515

1616
if sys.version_info < (2, 7):
1717
tests_require.append('unittest2')

test/helper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import sys
66
import os
77
import httpretty
8-
from nose.exc import SkipTest
98

109
if sys.version_info < (3, 3):
1110
from mock import DEFAULT

test/tinify_client_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import tinify
88
from tinify import Client, AccountError, ClientError, ConnectionError, ServerError
99
import requests
10+
import pytest
1011

1112
from helper import *
1213

@@ -75,10 +76,9 @@ def setUp(self):
7576
'compression-count': 12
7677
})
7778

79+
@pytest.mark.skip(reason="https://github.com/gabrielfalcao/HTTPretty/issues/122")
7880
def test_should_issue_request_with_proxy_authorization(self):
79-
raise SkipTest('https://github.com/gabrielfalcao/HTTPretty/issues/122')
8081
Client('key', None, 'http://user:pass@localhost:8080').request('GET', '/')
81-
8282
self.assertEqual(self.request.headers['proxy-authorization'], 'Basic dXNlcjpwYXNz')
8383

8484
class TinifyClientRequestWithTimeoutRepeatedly(TestHelper):

test/tinify_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from base64 import b64encode
55

66
import tinify
7+
import pytest
78
from helper import *
89

910
class TinifyKey(TestHelper):
@@ -27,13 +28,14 @@ def test_should_reset_client_with_new_app_identifier(self):
2728
self.assertEqual(self.request.headers['user-agent'], tinify.Client.USER_AGENT + " MyApp/2.0")
2829

2930
class TinifyProxy(TestHelper):
31+
32+
@pytest.mark.skip(reason="https://github.com/gabrielfalcao/HTTPretty/issues/122")
3033
def test_should_reset_client_with_new_proxy(self):
3134
httpretty.register_uri(httpretty.CONNECT, 'http://localhost:8080')
3235
tinify.key = 'abcde'
3336
tinify.proxy = 'http://localhost:8080'
3437
tinify.get_client()
3538
tinify.proxy = 'http://localhost:8080'
36-
raise SkipTest('https://github.com/gabrielfalcao/HTTPretty/issues/122')
3739
tinify.get_client().request('GET', '/')
3840
self.assertEqual(self.request.headers['user-agent'], tinify.Client.USER_AGENT + " MyApp/2.0")
3941

0 commit comments

Comments
 (0)