• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python functions.valid_content函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中networkapi.test.functions.valid_content函数的典型用法代码示例。如果您正苦于以下问题:Python valid_content函数的具体用法?Python valid_content怎么用?Python valid_content使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了valid_content函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_save_none

 def test_save_none(self):
     mock = self.mock_valid()
     mock["nome"] = "InterfaceNone"
     mock[self.KEY_ATTR] = self.NONE_ATTR
     response = self.save({self.XML_KEY: mock})
     valid_response(response)
     valid_content(response, self.XML_KEY)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:7,代码来源:test_Interface.py


示例2: test_save_ipv4_valid

 def test_save_ipv4_valid(self):
     mock = self.mock_network_ip_valid()
     mock[self.KEY_ATTR] = 26
     response = self.client_autenticado().postXML(
         self.URL_SAVE_NETWORK_IPV4, {self.XML_KEY_NETWORK_IP: mock})
     valid_response(response)
     valid_content(response, self.XML_KEY_NETWORK_IP)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:7,代码来源:test_Network.py


示例3: test_save_ipv6_valid

 def test_save_ipv6_valid(self):
     mock = self.mock_network_hosts_ip_valid()
     mock['id_vlan'] = 17
     response = self.client_autenticado().putXML(
         self.URL_SAVE_NETWORK_IPV6, {self.XML_KEY_NETWORK_IP: mock})
     valid_response(response)
     valid_content(response, self.XML_KEY_NETWORK_IP)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:7,代码来源:test_Network.py


示例4: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        content = valid_content(response, self.XML_KEY)

        response = self.search(id_env_vip=content["id"])
        valid_response(response)
        env_vip = valid_content(response, self.XML_KEY)
        self.valid_attr(mock, env_vip)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:10,代码来源:test_EnvironmentVIP.py


示例5: test_save_networkIpv6_set_first_available_ip_valid

    def test_save_networkIpv6_set_first_available_ip_valid(self):
        mock = self.mock_networkIpv6_set_first_available_ip_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        response_dict = valid_content(response, self.XML_KEY)

        response = self.client_autenticado().get(
            self.URL_GET_IPS_BY_IPV6_ID % response_dict['id'])
        valid_response(response)
        valid_content(response, self.XML_KEY_IPS_NETWORK, True)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:10,代码来源:test_Network.py


示例6: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        group_user = valid_content(response, self.XML_KEY)

        response = self.get_by_id(group_user['id'])
        valid_response(response)
        content = valid_content(response, self.XML_KEY)
        self.valid_attr(mock, content)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:10,代码来源:test_GroupUser.py


示例7: test_associate_valid

    def test_associate_valid(self):
        response = self.client_autenticado().put(
            self.URL_ASSOCIATE % (self.ID_VALID, self.ID_TYPE_EQUIPMENT))
        valid_response(response)
        valid_content(response, "equiptype_filter_xref")

        # Remove filter association so it does not require cleaning db manually
        response = self.client_autenticado().put(
            self.URL_DISSOCIATE % (self.ID_VALID, self.ID_TYPE_EQUIPMENT))
        valid_response(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:10,代码来源:test_Filter.py


示例8: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        content = valid_content(response, self.XML_KEY)

        response = self.get_by_id(content["id"])
        valid_response(response)
        ovip = valid_content(response, self.XML_KEY)

        self.valid_attr(mock, ovip)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:11,代码来源:test_OptionVIP.py


示例9: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        content = valid_content(response, "perm")

        response = self.get_by_id(content["id"])
        valid_response(response)
        perm = valid_content(response, "perm")

        self.valid_attr(mock, perm)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:11,代码来源:test_PermissionAdministrative.py


示例10: test_save_networkIpv6AddResource_set_first_available_ip_valid

    def test_save_networkIpv6AddResource_set_first_available_ip_valid(self):
        mock = self.mock_networkIpv6AddResource_set_first_available_ip_valid()
        response = self.client_autenticado().postXML(
            self.URL_SAVE_NETWORK_IPV6, {self.XML_KEY_NETWORK_IP: mock})
        valid_response(response)
        response_dict = valid_content(response, self.XML_KEY_NETWORK_IP)

        response = self.client_autenticado().get(
            self.URL_GET_IPS_BY_IPV6_ID % response_dict['id_network'])
        valid_response(response)
        valid_content(response, self.XML_KEY_IPS_NETWORK, True)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:11,代码来源:test_Network.py


示例11: test_associate_valid

    def test_associate_valid(self):
        response = self.client_autenticado().put(
            self.URL_ASSOCIATE % (self.ID_OPTION_VIP_FOR_ASSOCIATION, self.ID_ENV_VIP_FOR_ASSOCIATION)
        )
        valid_response(response)
        valid_content(response, "opcoesvip_ambiente_xref")

        # Dissociate so it does not require cleaning db manually
        response = self.client_autenticado().delete(
            self.URL_DISSOCIATE % (self.ID_OPTION_VIP_FOR_ASSOCIATION, self.ID_ENV_VIP_FOR_ASSOCIATION)
        )
        valid_response(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:12,代码来源:test_OptionVIP.py


示例12: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        brand = valid_content(response, "brand")

        response = self.get_all()
        valid_response(response)
        content = valid_content(response, "brand")

        for brd in content:
            if brd["id"] == brand["id"]:
                self.valid_attr(mock, brd)
                break
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:14,代码来源:test_Brand.py


示例13: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        script = valid_content(response, "script")

        response = self.get_all()
        valid_response(response)
        content = valid_content(response, "script")

        for scr in content:
            if scr["id"] == script["id"]:
                self.valid_attr(mock, scr)
                break
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:14,代码来源:test_Script.py


示例14: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        divisiondc = valid_content(response, "division_dc")

        response = self.get_all()
        valid_response(response)
        content = valid_content(response, "division_dc")

        for ddc in content:
            if ddc["id"] == divisiondc["id"]:
                self.valid_attr(mock, ddc)
                break
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:14,代码来源:test_DivisionDc.py


示例15: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        content = valid_content(response, "usuario")

        response = self.get_by_id(content["id"])
        valid_response(response)
        user = valid_content(response, "usuario")

        assert bool(user["ativo"]) == True

        mock['password'] = hashlib.md5(mock['password']).hexdigest()
        self.valid_attr(mock, user)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:14,代码来源:test_User.py


示例16: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        loc_env = valid_content(response, "logical_environment")

        response = self.get_all()
        valid_response(response)
        content = valid_content(response, "logical_environment")

        for env in content:
            if env["id"] == loc_env["id"]:
                self.valid_attr(mock, env)
                break
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:14,代码来源:test_LogicalEnvironment.py


示例17: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        content = valid_content(response, "filter")

        response = self.get_by_id(content["id"])
        valid_response(response)
        fil = valid_content(response, "filter")
        self.valid_attr(mock, fil)

        # Remove filter so it does not require cleaning db manually
        response = self.remove(content['id'])
        valid_response(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:14,代码来源:test_Filter.py


示例18: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        equipment_type = valid_content(response, "equipment_type")

        response = self.get_all()
        valid_response(response)
        content = valid_content(response, "equipment_type")

        for etype in content:
            if etype["id"] == equipment_type["id"]:
                self.valid_attr(mock, etype)
                break
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:14,代码来源:test_EquipmentType.py


示例19: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        groupl3 = valid_content(response, "group_l3")

        response = self.get_all()
        valid_response(response)
        content = valid_content(response, "group_l3")

        for grp in content:
            if grp["id"] == groupl3["id"]:
                self.valid_attr(mock, grp)
                break
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:14,代码来源:test_GroupL3.py


示例20: test_save_valid

    def test_save_valid(self):
        mock = self.mock_valid()
        response = self.save({self.XML_KEY: mock})
        valid_response(response)
        model = valid_content(response, "model")

        response = self.get_all()
        valid_response(response)
        content = valid_content(response, "model")

        for mdl in content:
            if mdl["id"] == model["id"]:
                self.valid_attr(mock, mdl)
                break
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:14,代码来源:test_Model.py



注:本文中的networkapi.test.functions.valid_content函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python functions.valid_response函数代码示例发布时间:2022-05-27
下一篇:
Python functions.string_generator函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap