Exemplo n.º 1
0
 def change_product (self, body_expected, product, Accept):
     """
     Add product name in response for verify in body
     :param body_expected:
     :param product:
     :param Accept:
     :return:
     """
     if Accept == "xml":
         label = '</name>'
     elif Accept == "json":
         label = '","description"'
     else:
         return body_expected
     return utils.insert_label (body_expected, label, product)
Exemplo n.º 2
0
 def change_product(self, body_expected, product, Accept):
     """
     Add product name in response for verify in body
     :param body_expected:
     :param product:
     :param Accept:
     :return:
     """
     if Accept == "xml":
         label = '</name>'
     elif Accept == "json":
         label = '","description"'
     else:
         return body_expected
     return utils.insert_label(body_expected, label, product)
Exemplo n.º 3
0
 def change_version (self, body_expected, version, Accept):
     """
     Add version name in response for verify in body
     :param body_expected:
     :param version:
     :param Accept:
     :return:
     """
     if Accept == "xml":
         label = '</version>'
     elif Accept == "json":
         label = '","product"'
     else:
         return body_expected
     return utils.insert_label (body_expected, label, version)
Exemplo n.º 4
0
 def change_version(self, body_expected, version, Accept):
     """
     Add version name in response for verify in body
     :param body_expected:
     :param version:
     :param Accept:
     :return:
     """
     if Accept == "xml":
         label = '</version>'
     elif Accept == "json":
         label = '","product"'
     else:
         return body_expected
     return utils.insert_label(body_expected, label, version)