Ejemplo n.º 1
0
    def setUpClass(cls):
        global mysql
        mysql = MysqlUtil()
        sql = "select * from message.message_circle where id != '' order by id  desc limit 1; "

        global max_uuid
        max_uuid = mysql.fetch_one(sql)['id']  # 事先查出来圈子表中最新的id,也就是最新的那个圈子
Ejemplo n.º 2
0
 def setUp(self):
     global mysql
     mysql = MysqlUtil()
     sql = "select * from message.message_circle_vote_questions where id != '' order by id desc limit 1;"
     global max_id
     max_id = mysql.fetch_one(sql)[
         'id']  # 事先取出数据库中,未新增问答前的最大id,因为后面接口新增成功,数据库中id会+1
Ejemplo n.º 3
0
    def setUp(self):
        global mysql
        mysql = MysqlUtil()

        global max_id
        sql = "select * from message.message_circle_vote_questions_link where id != '' order by id desc limit 1;"
        max_id = mysql.fetch_one(sql)  # 事先查出最新的投票问答,评论
Ejemplo n.º 4
0
 def setUpClass(cls):
     global mysql
     mysql = MysqlUtil()
     sql = "select * from message.message_circle where id != '' order by id  desc limit 1; "
     global max_uuid
     max_uuid = mysql.fetch_one(sql)  # 事先从数据库中查出最新的圈子信息
     print(max_uuid)
Ejemplo n.º 5
0
    def setUp(self):
        global mysql
        mysql = MysqlUtil()

        global domain
        domain = mysql.fetch_one(
            "SELECT * FROM message.`message_circle_field` where id != '' order by id  desc limit 1;"
        )
 def setUp(self):
     global mysql
     mysql = MysqlUtil()
     global article_status
     sql = "select * from message.message_circle_link where circle_uuid = '555c54bb67a546569969e8c5d8d0c538' and message_uuid = '9db154e2be2e450488bb8dd14c767f4b';"
     article_status = mysql.fetch_one(
         sql
     )['status']  # 事先查出:第一条用例时"9db154e2be2e450488bb8dd14c767f4b"在第四个圈子中的状态,应该是为0
    def setUp(self):
        global mysql
        mysql = MysqlUtil()
        global newest_vote
        vote_sql = "select * from message.message_circle_vote_questions" \
                   " where circle_uuid = '555c54bb67a546569969e8c5d8d0c538' " \
                   "and activity_type = 1 " \
                   "and status = 1 " \
                   "order by id desc limit 1;"
        newest_vote = mysql.fetch_one(vote_sql)  #提前查询出 第四个圈子下,最新的启用状态投票

        global newest_answers
        ans_sql = "select * from message.message_circle_vote_questions " \
                  "where circle_uuid = '555c54bb67a546569969e8c5d8d0c538' " \
                  "and activity_type = 2 " \
                  "and status = 1 " \
                  "order by id desc limit 1;"
        newest_answers = mysql.fetch_one(ans_sql)  #提前查询出 第四个圈子下,最新的启用状态问答
Ejemplo n.º 8
0
 def setUp(self):
     global mysql
     mysql = MysqlUtil()
     sql = "select * from message.message_circle_link_account" \
           " where circle_uuid = '555c54bb67a546569969e8c5d8d0c538' " \
           "and account_uuid = '7cd855be8df149bc86d816add22ec3d3' ;"
     global super_status
     super_status = mysql.fetch_one(sql)[
         'status']  # 事先查出super 用户,在第四个圈子的  状态
Ejemplo n.º 9
0
 def setUp(self):
     global mysql
     mysql = MysqlUtil()
     sql_1 = "select * from message.message_circle_link_account " \
             "where circle_uuid = '555c54bb67a546569969e8c5d8d0c538' " \
             "and account_uuid = 'eab0303b2db04247add02ad2f0d13682'"
     global join_status
     join_status = mysql.fetch_one(sql_1)[
         'status']  # 提前查出:第一条用例时"开心就好"在第四个圈子中的状态,应该是为0
Ejemplo n.º 10
0
    def setUp(self):
        global mysql
        mysql = MysqlUtil()  # 数据库实例化

        global max_circle_field_link  # 把圈子领域信息表中最大值查出来
        max_circle_field_link = mysql.fetch_one(
            "select * from message.message_circle_field_link where id != '' order by id desc;"
        )['id']

        global enabled_circle, enabled_domain  # 四个全局变量,参数中要用到:启用的圈子/禁用的圈子 启用的领域/禁用的领域

        # 事先从数据库查出需要的参数
        enabled_circle = mysql.fetch_one(
            "select * from message.message_circle"
            " where `status` = 1 and uuid "
            "not in(select circle_uuid from message.message_circle_field_link where `status` = 2 ) "
            "order by id  desc limit 1;")  # 查出可以加入领域的圈子

        enabled_domain = mysql.fetch_one(
            "select * from message.message_circle_field where id != '' and status = 2  order by id desc limit 1 ;"
        )  # 启用状态领域
Ejemplo n.º 11
0
 def setUp(self):
     global mysql
     mysql = MysqlUtil()
     global alter_ago
     sql = "select * from message.message_circle_vote_questions where circle_uuid = '555c54bb67a546569969e8c5d8d0c538' and activity_type = 1 order by id desc limit 1;"
     alter_ago = mysql.fetch_one(sql)  # 事先查出第四个圈子下最新的一个投票
Ejemplo n.º 12
0
 def setUp(self):
     global mysql
     mysql = MysqlUtil()
     global max_id
     sql = "select * from  message.message_circle_link where circle_uuid = '555c54bb67a546569969e8c5d8d0c538' order by id desc limit 1;"
     max_id = mysql.fetch_one(sql)['id'] # 事先查出"第四个圈子"下最新的发布id,因为后面调用发布接口,成功后数据库id会加1
Ejemplo n.º 13
0
 def setUp(self):
     global mysql
     mysql = MysqlUtil()
     sql = "select * from message.message_circle_vote_questions where id != '' order by id desc limit 1; "
     global max_id
     max_id = mysql.fetch_one(sql)['id'] # 事先查出最新的圈子投票id
Ejemplo n.º 14
0
 def setUp(self):
     global mysql
     mysql = MysqlUtil()
     global newest_id
     sql = "select * from message.message_circle_vote_questions where circle_uuid = '555c54bb67a546569969e8c5d8d0c538' order by id desc limit 1;"
     newest_id = mysql.fetch_one(sql)  # 第四个圈子下,最新的问答信息
Ejemplo n.º 15
0
 def setUp(self):
     print("============================开始测试============================")
     global mysql
     mysql = MysqlUtil()
     global newest
     newest = mysql.fetch_one("SELECT * FROM message.`message_circle_field` where id != '' order by id  desc limit 1;")# 事先查出最新的领域