def __init__ (self, name):
     """
     @since: 0.3.0
     
     @param name: the test name.
     @type name: str
     """
     DQTestCase.__init__(self, name)
示例#2
0
    def __init__(self, name=False):
        """
        Constructs an instance of DQPingTestCase.
        
        @since: 0.2.2
        
        @param name: testcase name.
        @type name: str
        """
        DQTestCase.__init__(self, name)

        self.ip_valid = "127.0.0.1"
        self.ip_unknown_host = "128.0.0.1"

        self.urls = [
            "http://www.cern.ch/",
            "http://www.cern.ch:8/",
            "http://www.cern.ch:80/",
            "http://www.cern.ch:800/",
            "http://www.cern.ch:8000/",
            "http://www.cern.ch:/",
            "http://www.cern.ch",
            "http://www.cern.ch:8",
            "http://www.cern.ch:80",
            "http://www.cern.ch:800",
            "http://www.cern.ch:8000",
            "http://www.cern.ch:",
        ]

        self.urlssec = [
            "https://www.cern.ch/",
            "https://www.cern.ch:8/",
            "https://www.cern.ch:80/",
            "https://www.cern.ch:800/",
            "https://www.cern.ch:8000/",
            "https://www.cern.ch:",
            "https://www.cern.ch",
            "https://www.cern.ch:8",
            "https://www.cern.ch:80",
            "https://www.cern.ch:800",
            "https://www.cern.ch:8000",
            "https://www.cern.ch:/",
        ]

        self.srms = [
            "srm:castor.cern.ch:8443/dasdsa//ddsa////dasdsadas",
            "srm:/castor.cern.ch:8443/dasdsa//ddsa////dasdsadas",
            "srm://castor.cern.ch/dsfds//32dsadsa/",
            "srm://castor.cern.ch:1/dsfds//32dsadsa/",
            "srm://castor.cern.ch:12/dsfds//32dsadsa/",
            "srm://castor.cern.ch:123/dsfds//32dsadsa/",
            "srm://castor.cern.ch:1234/dsfds//32dsadsa/",
            "srm://castor.cern.ch:12345/dsfds//32dsadsa/",
            "srm://///castor.cern.ch:8443//fdsfdsfd/fds//f/dfdsafsa",
        ]
示例#3
0
    def __init__ (self, name):
        """
        Constructs an instance of DQValidatorTestCase.
        
        @author: Pedro Salgado
        @contact: [email protected]
        @since: 0.2
        
        @param name: testcase name.
        @type name: str
        """
        DQTestCase.__init__(self, name)
        
        self.param_date = dq2.common.validator.testcase.data.dates
        self.param_invalid_date = dq2.common.validator.testcase.data.dates_invalid
        
        self.param_dict_0 = {}
        
        self.param_int__1 = -1
        self.param_int_0 = 0
        self.param_int_1 = 1
        
        self.param_lst_0 = []
        
        self.param_md5_01 = 'md5:9cf3329655f1bbe73340f7a60b0ff76c'
        self.param_md5_02 = 'md5:ac5cf111f8300aa97ddc01842587f46b'
        
        self.param_invalid_md5_36 = 'md5:9cf3329655f1bbe73340f7a60b0ff76g'
        
        self.param_invalid_site_0 = '<invalid_site>'
        
        self.param_str_0 = ''
        self.param_str_1 = '1'
        self.param_str_10 = 'A' * 10
        self.param_str_11 = 'A' * 11
        self.param_str_20 = 'A' * 20
        self.param_str_36 = 'A' * 36
        self.param_str_37 = 'A' * 37
        self.param_str_50 = 'A' * 50
        self.param_str_51 = 'A' * 51
        self.param_str_132 = 'A' * 133
        self.param_str_133 = 'A' * 134
        self.param_str_255 = 'A' * 255
        self.param_str_256 = 'A' * 256
        self.param_str_512 = 'A' * 512
        self.param_str_513 = 'A' * 513
        self.param_str = [
            self.param_str_0,
            self.param_str_1,
            self.param_str_10,
            self.param_str_11,
            self.param_str_20,
            self.param_str_36,
            self.param_str_37,
            self.param_str_50,
            self.param_str_51,
            self.param_str_132,
            self.param_str_133,
            self.param_str_255,
            self.param_str_256,
            self.param_str_512,
            self.param_str_513
        ]
        
        self.param_invalid_dsn_0 = 'dqtest/invalid/name'
        
        self.param_invalid_lfn_0 = 'dqtest/invalid/name'
        
        self.param_owner = dq2.common.validator.testcase.data.owners
        
        self.param_tpl_0 = ()
        
        self.param_uuid_01 = dq2.common.generate_uuid()
        self.param_uuid_02 = '90c2a03b-5526-4616-8283-7d9d20c0214b'
        
        self.param_url_00 = 'http://www.cern.ch/'
        self.param_url_01 = 'http://www.cern.ch:8/'
        self.param_url_02 = 'http://www.cern.ch:80/'
        self.param_url_03 = 'http://www.cern.ch:800/'
        self.param_url_04 = 'http://www.cern.ch:8000/'
        self.param_url_05 = 'http://www.cern.ch:/'
        self.param_url_10 = 'http://www.cern.ch'
        self.param_url_11 = 'http://www.cern.ch:8'
        self.param_url_12 = 'http://www.cern.ch:80'
        self.param_url_13 = 'http://www.cern.ch:800'
        self.param_url_14 = 'http://www.cern.ch:8000'
        self.param_url_15 = 'http://www.cern.ch:'
        self.param_url = [
            self.param_url_00,
            self.param_url_01,
            self.param_url_02,
            self.param_url_03,
            self.param_url_04,
            self.param_url_05,
            self.param_url_10,
            self.param_url_11,
            self.param_url_12,
            self.param_url_13,
            self.param_url_14,
            self.param_url_15
        ]
        
        
        self.param_urlsec_00 = 'https://www.cern.ch/'
        self.param_urlsec_01 = 'https://www.cern.ch:8/'
        self.param_urlsec_02 = 'https://www.cern.ch:80/'
        self.param_urlsec_03 = 'https://www.cern.ch:800/'
        self.param_urlsec_04 = 'https://www.cern.ch:8000/'
        self.param_urlsec_05 = 'https://www.cern.ch:'
        self.param_urlsec_10 = 'https://www.cern.ch'
        self.param_urlsec_11 = 'https://www.cern.ch:8'
        self.param_urlsec_12 = 'https://www.cern.ch:80'
        self.param_urlsec_13 = 'https://www.cern.ch:800'
        self.param_urlsec_14 = 'https://www.cern.ch:8000'
        self.param_urlsec_15 = 'https://www.cern.ch:/'
        self.param_urlsec = [
            self.param_urlsec_00,
            self.param_urlsec_01,
            self.param_urlsec_02,
            self.param_urlsec_03,
            self.param_urlsec_04,
            self.param_urlsec_05,
            self.param_urlsec_10,
            self.param_urlsec_11,
            self.param_urlsec_12,
            self.param_urlsec_13,
            self.param_urlsec_14,
            self.param_urlsec_15
        ]
        
        self.param_invalid_url_0 = 'htp://www.cern.ch:/'
        self.param_invalid_url_1 = 'htps://www.cern.ch:/'
        
        self.param_with_blanks_0 = ' A'
        self.param_with_blanks_1 = 'A A'
        self.param_with_blanks_2 = 'AA '
        self.param_with_blanks = [
            self.param_with_blanks_0,
            self.param_with_blanks_1,
            self.param_with_blanks_2
        ]
        
        self.param_with_slash_0 = '/'
        self.param_with_slash_1 = 'AA/'
        self.param_with_slash_2 = '/AA'
        self.param_with_slash_3 = 'A/A'
        self.param_with_slash = [
            self.param_with_slash_0,
            self.param_with_slash_1,
            self.param_with_slash_2,
            self.param_with_slash_3
        ]
        
        self.param_with_backslash_0 = '\\'
        self.param_with_backslash_1 = '\\AA'
        self.param_with_backslash_2 = 'AA\\'
        self.param_with_backslash_3 = 'A\\A'
        self.param_with_backslash = [
            self.param_with_backslash_0,
            self.param_with_backslash_1,
            self.param_with_backslash_2,
            self.param_with_backslash_3
        ]

        self.param_with_at_0 = "@"
        self.param_with_at_1 = "@A"
        self.param_with_at_2 = "A@"
        self.param_with_at_3 = "A@A"
        self.param_with_at = [
            self.param_with_at_0,
            self.param_with_at_1,
            self.param_with_at_2,
            self.param_with_at_3
        ]     
        
        self.param_date_criteria_0 = '<>'