本文整理汇总了Python中networkapi.test.functions.string_generator函数的典型用法代码示例。如果您正苦于以下问题:Python string_generator函数的具体用法?Python string_generator怎么用?Python string_generator使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了string_generator函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_authenticate_wrong_password
def test_authenticate_wrong_password(self):
mock = self.user_login_valid()
mock['password'] = string_generator(10)
response = self.client_autenticado().postXML(
self.URL_AUTHENTICATE, {self.XML_KEY: mock})
valid_response(response)
assert xml2dict(response.content) == None
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:7,代码来源:test_User.py
示例2: test_change_pass_maxsize
def test_change_pass_maxsize(self):
data = self.user_change_pass_valid()
data['password'] = string_generator(46)
response = self.client_autenticado().postXML(
self.URL_CHANGE_PASS, {self.XML_KEY: data})
valid_response(response, status_code=httplib.INTERNAL_SERVER_ERROR)
self._attr_invalid(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:7,代码来源:test_User.py
示例3: mock_for_disconnect
def mock_for_disconnect(self):
mock = {}
mock['nome'] = string_generator(10)
mock['descricao'] = 'mock'
mock['protegida'] = '0'
mock["id_ligacao_front"] = self.ID_DISCONNECT_VALID
return mock
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:7,代码来源:test_Interface.py
示例4: test_save_invalid
def test_save_invalid(self):
mock = self.mock_network_valid()
mock[self.KEY_ATTR] = string_generator(10)
self.process_save_attr_invalid(mock)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:4,代码来源:test_Network.py
示例5: test_alter_minsize
def test_alter_minsize(self):
mock = self.mock_valid()
mock[self.KEY_ATTR] = string_generator(2)
self.process_alter_attr_invalid(self.ID_ALTER_VALID, mock)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:4,代码来源:test_AccessType.py
示例6: test_get_by_equip_name_invalid
def test_get_by_equip_name_invalid(self):
data = self.dict_for_get_by_equip_name(string_generator(25))
response = self.client_autenticado().postXML(
self.URL_GET_BY_EQUIP_NAME, data)
self._not_found(response, CodeError.EQUIPMENT_NOT_FOUND)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:5,代码来源:test_EquipmentScript.py
示例7: test_update_max_length
def test_update_max_length(self):
self.alter_attr_invalid(string_generator(self.NAME_MAX_LENGTH + 1))
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:2,代码来源:test_Rule.py
示例8: test_save_max_length
def test_save_max_length(self):
mock = self.mock_valid()
mock[self.KEY_ATTR] = string_generator(self.NAME_MAX_LENGTH + 1)
self.process_save_attr_invalid(mock)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:4,代码来源:test_Rule.py
示例9: test_save_maxsize
def test_save_maxsize(self):
mock = self.mock_environment_ip_config_valid()
mock[self.KEY_ATTR] = string_generator(201)
response = self.client_autenticado().postXML(
self.URL_SAVE_ENVIRONMENT_IPCONFIG, {self.XML_KEY: mock})
self._attr_invalid(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:6,代码来源:test_Environment.py
示例10: test_alter_empty
def test_alter_empty(self):
mock = self.mock_valid()
mock["name"] = string_generator(5)
mock[self.KEY_ATTR] = self.EMPTY_ATTR
response = self.alter(self.ID_ALTER_VALID, {self.XML_KEY: mock})
self._attr_invalid(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:6,代码来源:test_Filter.py
示例11: test_alter_none
def test_alter_none(self):
mock = self.mock_valid()
mock["nome"] = string_generator(5)
mock[self.KEY_ATTR] = self.NONE_ATTR
response = self.alter(self.ID_ALTER_VALID, {self.XML_KEY: mock})
valid_response(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:6,代码来源:test_Interface.py
示例12: test_alter_minsize
def test_alter_minsize(self):
mock = self.mock_valid()
mock[self.KEY_ATTR] = string_generator(2)
response = self.save({self.XML_KEY: mock})
valid_response(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:5,代码来源:test_Interface.py
示例13: test_list_conns_old_interface_minsize
def test_list_conns_old_interface_minsize(self):
response = self.client_autenticado().get(
self.URL_LIST_CONNECTIONS_OLD % (string_generator(2), self.EQUIP_FOR_LIST))
valid_response(response, httplib.INTERNAL_SERVER_ERROR)
assert_response_error(response, CodeError.INTERFACE_NOT_FOUND)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:5,代码来源:test_Interface.py
示例14: test_list_conns_old_interface_maxsize
def test_list_conns_old_interface_maxsize(self):
response = self.client_autenticado().get(
self.URL_LIST_CONNECTIONS_OLD % (string_generator(21), self.EQUIP_FOR_LIST))
self._attr_invalid(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:4,代码来源:test_Interface.py
示例15: test_save_expect_string_maxsize
def test_save_expect_string_maxsize(self):
mock = self.mock_valid()
mock[self.KEY_ATTR] = string_generator(51)
response = self.client_autenticado().postXML(
self.URL_SAVE_EXPECT_STRING, {self.XML_KEY: mock})
self._attr_invalid(response)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:6,代码来源:test_HealthcheckExpect.py
示例16: user_ldap_login_valid
def user_ldap_login_valid(self):
u_dict = {}
u_dict['username'] = 'USER_LDAP'
u_dict['password'] = string_generator(10)
u_dict['is_ldap_user'] = 'True'
return u_dict
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:6,代码来源:test_User.py
示例17: test_save_maxsize
def test_save_maxsize(self):
mock = self.mock_valid()
mock[self.KEY_ATTR] = string_generator(51)
self.process_save_attr_invalid(mock)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:4,代码来源:test_HealthcheckExpect.py
示例18: test_save_minsize
def test_save_minsize(self):
mock = self.mock_valid()
mock[self.KEY_ATTR] = string_generator(2)
self.save(mock)
开发者ID:itnihao,项目名称:GloboNetworkAPI,代码行数:4,代码来源:test_Filter.py
注:本文中的networkapi.test.functions.string_generator函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论