1#! /usr/bin/env python 2# -*- coding: utf-8 -*- 3# vi:ts=4:et 4 5import pycurl 6import unittest 7 8from . import util 9 10class ProtocolConstantsTest(unittest.TestCase): 11 @util.min_libcurl(7, 19, 4) 12 def test_7_19_4_protocols(self): 13 assert hasattr(pycurl, 'PROTO_ALL') 14 assert hasattr(pycurl, 'PROTO_DICT') 15 assert hasattr(pycurl, 'PROTO_FILE') 16 assert hasattr(pycurl, 'PROTO_FTP') 17 assert hasattr(pycurl, 'PROTO_FTPS') 18 assert hasattr(pycurl, 'PROTO_HTTP') 19 assert hasattr(pycurl, 'PROTO_HTTPS') 20 assert hasattr(pycurl, 'PROTO_LDAP') 21 assert hasattr(pycurl, 'PROTO_LDAPS') 22 assert hasattr(pycurl, 'PROTO_SCP') 23 assert hasattr(pycurl, 'PROTO_SFTP') 24 assert hasattr(pycurl, 'PROTO_TELNET') 25 assert hasattr(pycurl, 'PROTO_TFTP') 26 27 @util.min_libcurl(7, 20, 0) 28 def test_7_20_0_protocols(self): 29 assert hasattr(pycurl, 'PROTO_IMAP') 30 assert hasattr(pycurl, 'PROTO_IMAPS') 31 assert hasattr(pycurl, 'PROTO_POP3') 32 assert hasattr(pycurl, 'PROTO_POP3S') 33 assert hasattr(pycurl, 'PROTO_RTSP') 34 assert hasattr(pycurl, 'PROTO_SMTP') 35 assert hasattr(pycurl, 'PROTO_SMTPS') 36 37 @util.min_libcurl(7, 21, 0) 38 def test_7_21_0_protocols(self): 39 assert hasattr(pycurl, 'PROTO_RTMP') 40 assert hasattr(pycurl, 'PROTO_RTMPE') 41 assert hasattr(pycurl, 'PROTO_RTMPS') 42 assert hasattr(pycurl, 'PROTO_RTMPT') 43 assert hasattr(pycurl, 'PROTO_RTMPTE') 44 assert hasattr(pycurl, 'PROTO_RTMPTS') 45 46 @util.min_libcurl(7, 21, 2) 47 def test_7_21_2_protocols(self): 48 assert hasattr(pycurl, 'PROTO_GOPHER') 49