示例#1
0
 def test_h_exhibition_data_info(self):
     #调用新增展会数据
     textfield_type_1 = "".join(all_str_data()[:random.randrange(2, 15)])
     textfield_type_2 = "".join(all_str_data()[:random.randrange(2, 15)])
     textfield_type_3 = "".join(all_str_data()[:random.randrange(2, 15)])
     textfield_type_4 = "".join(all_str_data()[:random.randrange(2, 15)])
     exhibition_data_info = {
         'area': random.randrange(1, 100000),
         'net_area': random.randrange(1, 99999),
         'history_num': random.randrange(0, 100),
         'viewer_quantity': random.randrange(1, 50000),
         'textfield_type_1': textfield_type_1,
         'textfield_percent_1': '60',
         'exhibition_quantity': random.randrange(1, 50000),
         'textfield_type_2': textfield_type_2,
         'textfield_percent_2': '40',
         'exhibition_quantity': random.randrange(1, 50000),
         'textfield_type_3': textfield_type_3,
         'textfield_percent_3': '30',
         'textfield_type_4': textfield_type_4,
         'textfield_percent_4': '70',
         'viewer_satisfy': random.randrange(1, 100),
         'exhibitor_satisfy': random.randrange(1, 100)
     }
     New_Exhibition().new_exhibition_data(exhibition_id,
                                          exhibition_data_info)
示例#2
0
 def test_c_organization(self):
     # 调用新增举办机构
     zhuban_jigou_data = "".join(all_str_data()[:random.randrange(1, 120)])
     chenban_jigou_data = "".join(all_str_data()[:random.randrange(1, 120)])
     New_Exhibition().new_organization(exhibition_id,
                                       organizer=zhuban_jigou_data,
                                       contractor=chenban_jigou_data)
示例#3
0
 def test_i_exhibitor(self):
     #调用新增展商名录
     exhibitor_list_1 = "".join(all_str_data()[:random.randrange(8, 15)])
     exhibitor_list_2 = "".join(all_str_data()[:random.randrange(8, 15)])
     New_Exhibition().new_exhibitor(exhibition_id,
                                    exhibitor_list=exhibitor_list_1 + ',' +
                                    exhibitor_list_2)
 def test_a_submit_zhanzhuang_demand(self):
     #调用个人中心提交展装需求
     exhibition_id = Get_Var_Fun().zhubanfang_zhanhui_liebiao_var()[1]
     order_id = Back().back_management_list(code=4)
     exhibition_name = Back().back_booth_order_detials(order_id)[0]
     booth_id = Back().back_booth_order_detials(order_id)[1]
     booth_name = Back().back_booth_order_detials(order_id)[2]
     the_exhibition_title = "".join(
         all_str_data()[:random.randrange(1, 25)])
     designer_demand = "".join(all_str_data()[:random.randrange(1, 200)])
     the_exhibition_demand = "".join(
         all_str_data()[:random.randrange(1, 300)])
     service_item = [
         '会展设计', '会展设计+搭建', '会展搭建', '展具搭建', '交通运输', '印刷包装', '酒店旅游', '公关策划',
         '广告影视', '礼品模特'
     ]
     submit_zhanzhuang_demand_data = {
         'the_exhibition_title': the_exhibition_title,
         'service_item': random.choice(service_item),
         'finish_on': self.current_time_less,
         'designer_demand': designer_demand,
         'the_exhibition_demand': the_exhibition_demand
     }
     zhanzhuang_order().submit_zhanzhuang_demand(
         exhibition_id, exhibition_name, booth_id, booth_name,
         submit_zhanzhuang_demand_data)
 def test_book_zhanwei(self):
     #调用预定展位
     require_area = [
         '9m²', '18m²', '27m²', '36m²', '45m²', '54m²', '72m²', '90m²',
         '108m²', '9-18m²', '19-36m²', '37-54m²', '55-72m²', '73-108m²',
         '109-200m²', '200m²以上'
     ]
     enterprise = "".join(all_str_data()[:random.randrange(1, 20)])
     main_product = "".join(all_str_data()[:random.randrange(1, 10)])
     intent_exhibition = "".join(all_str_data()[:random.randrange(1, 30)])
     is_first_exhibit = [0, 1]
     book_zhanwei_data = {
         'contact': '测试',
         'mobil': 13690769964,
         'from_site': 10,
         'from_site_location': 'Home_Index_RightNav',
         'enterprise': enterprise,
         'main_product': main_product,
         'is_first_exhibit': random.choice(is_first_exhibit),
         'intent_city': '广东深圳',
         'exhibiti_on': self.after_time,
         'require_area': random.choice(require_area),
         'intent_exhibition': intent_exhibition
     }
     CanZhanBao().book_zhanwei(book_zhanwei_data)
示例#6
0
 def test_b_zhanhui_introduction(self):
     # 调用新增展会介绍
     zhanhui_jieshao_data = "".join(
         all_str_data()[:random.randrange(1, 1000)])
     zhanlan_fanwei_data = "".join(
         all_str_data()[:random.randrange(1, 500)])
     zhanhui_biaoqian_data = "".join(
         all_str_data()[:random.randrange(1, 30)]), "".join(
             all_str_data()[:random.randrange(1, 30)])
     New_Exhibition().new_zhanhui_introduction(
         exhibition_id,
         description=zhanhui_jieshao_data,
         scope=zhanlan_fanwei_data,
         label=zhanhui_biaoqian_data)
 def test_e_decorate_case_save(self):
     #调用添加公司案例
     title = self.now + "".join(all_str_data()[:random.randrange(1, 10)])
     description = "".join(all_str_data()[:random.randrange(1, 140)])
     material = ['木质材质', '桁架型材', '环保材质']
     style = ['简约', '现代', '中式', '欧式', '美式', '田园', '新古典', '混搭']
     designer = Get_Var_Fun().back_dajianshang_guangli_var()
     docorate_case_image_1 = Dajianshang_Business_Info_Edit(
     ).upload_picture(filename='picture1.png', data=3)
     docorate_case_image_2 = Dajianshang_Business_Info_Edit(
     ).upload_picture(filename='picture2.png', data=3)
     docorate_case_image_3 = Dajianshang_Business_Info_Edit(
     ).upload_picture(filename='picture3.png', data=3)
     docorate_case_image_4 = Dajianshang_Business_Info_Edit(
     ).upload_picture(filename='picture4.png', data=3)
     docorate_case_image_5 = Dajianshang_Business_Info_Edit(
     ).upload_picture(filename='picture5.png', data=3)
     docorate_case_image_all = [
         docorate_case_image_1, docorate_case_image_2,
         docorate_case_image_3, docorate_case_image_4, docorate_case_image_5
     ]
     docorate_case_image = ',' + random.choice(
         docorate_case_image_all) + ',' + random.choice(
             docorate_case_image_all) + ',' + random.choice(
                 docorate_case_image_all) + ',' + random.choice(
                     docorate_case_image_all) + ',' + random.choice(
                         docorate_case_image_all)
     color = [
         '白色', '米色', '黄色', '橙色', '红色', '粉色', '绿色', '蓝色', '紫色', '黑色', '咖啡色',
         '灰色', '彩色'
     ]
     color_add_id = random.choice(color)
     decorate_case_data = {
         'title': title,
         'description': description,
         'industry_name': '办公用品',
         'industry_id': 444,
         'area': random.randrange(1, 100),
         'booth_standard_type': random.randrange(1, 5),
         'material': random.choice(material),
         'style': random.choice(style),
         'designer': random.choice(designer),
         'price': str(random.randrange(1, 100000)),
         'color_add_id': color_add_id,
         'color': color_add_id,
         'docorate_case_image': docorate_case_image
     }
     print(random.choice(color))
     Dajianshang_Business_Info_Edit().decorate_case_save(decorate_case_data)
 def test_d_designer_save(self):
     #调用添加设计师
     name = "".join(all_str_data()[:random.randrange(2, 4)])
     title = ['设计总监', '高级设计师', '普通设计师']
     introduce = "".join(all_str_data()[:random.randrange(1, 90)])
     image_url = Dajianshang_Business_Info_Edit().upload_picture(
         filename='picture3.png', data=5)
     designer_data = {
         'name': name,
         'title': random.choice(title),
         'introduce': introduce,
         'image_url': image_url,
         'state': 1
     }
     Dajianshang_Business_Info_Edit().designer_save(designer_data)
 def test_c_qualification_save(self):
     #调用添加公司资质
     name = "".join(all_str_data()[:random.randrange(1, 30)])
     image_url = Dajianshang_Business_Info_Edit().upload_picture(
         filename='picture1.png', data=4)
     qualification_data = {'name': name, 'image_url': image_url}
     Dajianshang_Business_Info_Edit().qualification_save(qualification_data)
示例#10
0
 def test_d_boot_info(self):
     # 调用新增展位基本信息
     orderjson_data = {
         'biaozhan_price':
         random.randint(1, 100000),
         'biaozhan_area':
         random.randint(1, 100),
         'biaozhan_description':
         "".join(all_str_data()[:random.randrange(1, 60)]),
         'guangdi_price':
         random.randint(1, 10000),
         'guangdi_area':
         random.randint(1, 100),
         'guangdi_description':
         "".join(all_str_data()[:random.randrange(1, 60)])
     }
     New_Exhibition().new_booth_info(exhibition_id, orderjson_data)
示例#11
0
 def test_f_meeting(self):
     meeting_url = New_Exhibition().picture_upload(index=2,
                                                   filename='picture6.png')
     # 调用上传同期会议图片
     meeting_title = "".join(all_str_data()[:random.randrange(10, 30)])
     meeting_from_on = str(self.current_time_less)
     meeting_to_on = str(self.current_time_most)
     address = "".join(all_str_data()[:random.randrange(10, 50)])
     max_people = random.randrange(2, 100)
     descrition = "".join(all_str_data()[:random.randrange(10, 100)])
     new_meeting_data = {
         'meeting_title': meeting_title,
         'meeting_from_on': meeting_from_on,
         'meeting_to_on': meeting_to_on,
         'address': address,
         'organizer': '深圳展酷网络有限公司',
         'max_people': max_people,
         'image-url': meeting_url,
         'descrition': descrition
     }
     New_Exhibition().new_meeting(exhibition_id, new_meeting_data)
 def test_book_zhanzhuang(self):
     #调用预定展装服务
     exhibition_name = "".join(all_str_data()[:random.randrange(1, 30)])
     enterprise = "".join(all_str_data()[:random.randrange(1, 20)])
     budget = [
         '2万以下', '2~3万', '3~5万', '5~8万', '8~12万', '12~18万', '18~25万',
         '25~30万', '30万以上'
     ]
     service_item = ['会展设计', '会展搭建', '会展设计+搭建']
     book_zhanzhuang_data = {
         'contact': '测试',
         'mobil': 13690769964,
         'from_site': '10',
         'from_site_location': 'Home_Index_RightNav',
         'service_item': random.choice(service_item),
         'exhibition_name': exhibition_name,
         'tooth_area': random.randint(1, 100),
         'finish_on': self.after_time,
         'budget': random.choice(budget),
         'enterprise': enterprise,
     }
     CanZhanBao().book_zhanzhuang(book_zhanzhuang_data)
示例#13
0
 def test_a_basic_info(self):
     # 调用新增基本信息
     name_in = "".join(all_str_data()[:random.randrange(1, 50)])
     name = self.current_time + '测试-%s' % name_in  # 展会标题
     industry = random.choice(excel_table_by_index(by_index=0)[1:])
     industry_name = industry[1]
     industry_id = int(industry[0])
     info_data = {
         'name': name,
         'industry_name': industry_name,
         'industry_id': industry_id,
         'from_on': self.current_time_less,
         'to_on': self.current_time_most
     }
     basic_info = New_Exhibition().new_basic_info(info_data)
     global exhibition_id
     exhibition_id = basic_info['ID']
     assert basic_info['success'] == True
示例#14
0
 def test_k_add_zhanwei(self, x):
     #调用新增展位信息
     zhanwei_num = 'BoothNo' + str(random.randrange(1, 888))
     length = random.randrange(1, 25)
     width = random.randrange(1, 25)
     area = length * width
     description = "".join(all_str_data()[:random.randrange(0, 20)])
     zhanwei_data = {
         'zhanwei_num': zhanwei_num,
         'zhanguang_num': '深圳会展中心馆',
         'zhanwei_xingshi': random.randrange(1, 2),
         'kaikou_leixing': random.randrange(1, 5),
         'price': random.randrange(1, 10000),
         'area': area,
         'length': length,
         'width': width,
         'discount': random.randrange(1, 10),
         'is_sell': 1,
         'description': description
     }
     New_Exhibition().add_zhanwei(exhibition_id, zhanwei_data)
示例#15
0
 def setUp(self):
     Login().send_login_request(name=18165702795, password=123456)
     all_str_data()
示例#16
0
 def test_l_zhanwei_peizhi_xinxi(self):
     #调用新增展位配置信息
     standard_booth_config = "".join(
         all_str_data()[:random.randrange(1, 30)])
     New_Exhibition().zhanwei_peizhi_xinxi(exhibition_id,
                                           standard_booth_config)