diff options
| author | Ryan Williams <rdw@lindenlab.com> | 2010-02-24 22:28:57 -0800 |
|---|---|---|
| committer | Ryan Williams <rdw@lindenlab.com> | 2010-02-24 22:28:57 -0800 |
| commit | 4ec2cc509f249a66717d885bc59e4e4a9a105590 (patch) | |
| tree | 6f97153888b39c1a09779adbf29a912e22a6e375 /tests/stdlib | |
| parent | 6b8f995fad47622064d9f97033c8f8a65767a294 (diff) | |
| download | eventlet-4ec2cc509f249a66717d885bc59e4e4a9a105590.tar.gz | |
Fixed bad references in test_socket_ssl.py
Diffstat (limited to 'tests/stdlib')
| -rw-r--r-- | tests/stdlib/test_socket_ssl.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/stdlib/test_socket_ssl.py b/tests/stdlib/test_socket_ssl.py index 3814fea..d418e1a 100644 --- a/tests/stdlib/test_socket_ssl.py +++ b/tests/stdlib/test_socket_ssl.py @@ -5,6 +5,16 @@ from eventlet.green import socket from eventlet.green import urllib from eventlet.green import threading +# enable network resource +import test.test_support +i_r_e = test.test_support.is_resource_enabled +def is_resource_enabled(resource): + if resource == 'network': + return True + else: + return i_r_e(resource) +test.test_support.is_resource_enabled = is_resource_enabled + try: socket.ssl socket.sslerror @@ -22,6 +32,13 @@ test_basic = patcher.patch_function(test_basic, test_rude_shutdown = patcher.patch_function(test_rude_shutdown, ('threading', threading)) +def test_main(): + if not hasattr(socket, "ssl"): + raise test_support.TestSkipped("socket module has no ssl support") + test_rude_shutdown() + test_basic() + test_timeout() + if __name__ == "__main__": test_main() |
