Ejemplo n.º 1
0
    def get_blocks(self, config=None):
        """ Gets request blocks for the String Parameters.

        @return: A request block containing the string
        @rtype : List[str]

        """
        if self._is_custom:
            return [primitives.restler_custom_payload(self._content, quoted=True)]
        return [primitives.restler_static_string(self._content, quoted=True)]
Ejemplo n.º 2
0
    def get_blocks(self, config=None):
        """ Gets the request blocks for this value param.

        @return: A request block containing the value of the param
        @rtype : List[str]

        """
        if self._custom:
            return[primitives.restler_custom_payload(self._content)]
        return [primitives.restler_static_string(self._content)]
Ejemplo n.º 3
0
            'dependencies': [_city_put_name.writer()]
        }
    },
],
                           requestId="/city/{cityName}")
req_collection.add_request(request)

request = requests.Request([
    primitives.restler_static_string("GET "),
    primitives.restler_static_string("/"),
    primitives.restler_static_string("city"),
    primitives.restler_static_string("/"),
    primitives.restler_static_string(_city_put_name.reader()),
    primitives.restler_static_string("?"),
    primitives.restler_static_string("location="),
    primitives.restler_custom_payload("location"),
    primitives.restler_static_string("&"),
    primitives.restler_static_string("group="),
    primitives.restler_fuzzable_group("fuzzable_group_tag",
                                      ['A', 'BB', 'CCC']),
    primitives.restler_static_string(" HTTP/1.1\r\n"),
    primitives.restler_static_string("Accept: application/json\r\n"),
    primitives.restler_static_string("Host: restler.unit.test.server.com\r\n"),
    primitives.restler_static_string("Content-Type: application/json\r\n"),
    primitives.restler_refreshable_authentication_token(
        "authentication_token_tag"),
    primitives.restler_static_string("\r\n")
],
                           requestId="/city/{cityName}")
req_collection.add_request(request)
Ejemplo n.º 4
0
            'dependencies': [_city_put_name.writer()]
        }
    },
],
                           requestId="/city/{cityName}")
req_collection.add_request(request)

request = requests.Request([
    primitives.restler_static_string("GET "),
    primitives.restler_static_string("/"),
    primitives.restler_static_string("city"),
    primitives.restler_static_string("/"),
    primitives.restler_static_string(_city_put_name.reader()),
    primitives.restler_static_string("?"),
    primitives.restler_static_string("location="),
    primitives.restler_custom_payload("location"),
    primitives.restler_static_string("&"),
    primitives.restler_static_string("group="),
    primitives.restler_fuzzable_group("fuzzable_group_tag",
                                      ['A', 'BB', 'CCC']),
    primitives.restler_static_string(" HTTP/1.1\r\n"),
    primitives.restler_static_string("Accept: application/json\r\n"),
    primitives.restler_static_string("Host: restler.unit.test.server.com\r\n"),
    primitives.restler_static_string("Content-Type: application/json\r\n"),
    primitives.restler_refreshable_authentication_token(
        "authentication_token_tag"),
    primitives.restler_static_string("\r\n")
],
                           requestId="/city/{cityName}")
req_collection.add_request(request)
request = requests.Request([
    primitives.restler_static_string("POST "),
    primitives.restler_static_string("/"),
    primitives.restler_static_string("api"),
    primitives.restler_static_string("/"),
    primitives.restler_static_string("stores"),
    primitives.restler_static_string("/"),
    primitives.restler_static_string(_stores_post_id.reader()),
    primitives.restler_static_string("/"),
    primitives.restler_static_string("order"),
    primitives.restler_static_string("?"),
    primitives.restler_static_string("submittedDate="),
    primitives.restler_fuzzable_datetime("2019-06-26T20:20:39+00:00", quoted=False),
    primitives.restler_static_string("&"),
    primitives.restler_static_string("message="),
    primitives.restler_custom_payload("message", quoted=False),
    primitives.restler_static_string(" HTTP/1.1\r\n"),
    primitives.restler_static_string("Accept: application/json\r\n"),
    primitives.restler_static_string("Host: localhost:8888\r\n"),
    primitives.restler_static_string("Content-Type: application/json\r\n"),
    primitives.restler_static_string("\r\n"),
    primitives.restler_static_string("{"),
    primitives.restler_static_string("""
    "tags":"""),
    primitives.restler_fuzzable_object("{ \"fuzz\": false }"),
    primitives.restler_static_string(""",
    "storeId":"""),
    primitives.restler_fuzzable_int("1"),
    primitives.restler_static_string(""",
    "storeProperties":
        {
 primitives.restler_static_string("Host: localhost:8888\r\n"),
 primitives.restler_static_string("Content-Type: application/json\r\n"),
 primitives.restler_refreshable_authentication_token("authentication_token_tag"),
 primitives.restler_static_string("\r\n"),
 primitives.restler_static_string("{"),
 primitives.restler_static_string("""
 "tags":"""),
 primitives.restler_fuzzable_object("{ \"fuzz\": false }"),
 primitives.restler_static_string(""",
 "storeId":"""),
 primitives.restler_fuzzable_int("1"),
 primitives.restler_static_string(""",
 "storeProperties":
     {
         "tags":"""),
 primitives.restler_custom_payload("/storeProperties/tags", quoted=False),
 primitives.restler_static_string(""",
         "intro":"""),
 primitives.restler_custom_payload("/storeProperties/intro", quoted=True),
 primitives.restler_static_string("""
     }
 ,
 "deliveryProperties":
     {
         "tags":"""),
 primitives.restler_fuzzable_object("{ \"fuzz\": false }"),
 primitives.restler_static_string("""
     }
 ,
 "rush":"""),
 primitives.restler_fuzzable_bool("true"),