Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the remaining example tests into their own files.
- Loading branch information
Showing
9 changed files
with
81 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from unittest import SkipTest | ||
|
||
|
||
import gevent.testing as greentest | ||
|
||
from . import test__example_wsgiserver | ||
|
||
|
||
@greentest.skipOnCI("Timing issues sometimes lead to a connection refused") | ||
@greentest.skipWithoutExternalNetwork("Tries to reach google.com") | ||
class Test_webproxy(test__example_wsgiserver.Test_wsgiserver): | ||
server = 'webproxy.py' | ||
|
||
def _run_all_tests(self): | ||
status, data = self.read('/') | ||
self.assertEqual(status, '200 OK') | ||
self.assertIn(b"gevent example", data) | ||
status, data = self.read('/http://www.google.com') | ||
self.assertEqual(status, '200 OK') | ||
self.assertIn(b'google', data.lower()) | ||
|
||
def test_a_blocking_client(self): | ||
# Not applicable | ||
raise SkipTest("Not applicable") | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
greentest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import ssl | ||
|
||
import gevent.testing as greentest | ||
|
||
from gevent.testing import params | ||
|
||
from . import test__example_wsgiserver | ||
|
||
|
||
@greentest.skipOnCI("Timing issues sometimes lead to a connection refused") | ||
class Test_wsgiserver_ssl(test__example_wsgiserver.Test_wsgiserver): | ||
server = 'wsgiserver_ssl.py' | ||
URL = 'https://%s:8443' % (params.DEFAULT_LOCAL_HOST_ADDR,) | ||
PORT = 8443 | ||
_use_ssl = True | ||
|
||
if hasattr(ssl, '_create_unverified_context'): | ||
# Disable verification for our self-signed cert | ||
# on Python >= 2.7.9 and 3.4 | ||
ssl_ctx = ssl._create_unverified_context() | ||
|
||
|
||
if __name__ == '__main__': | ||
greentest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters