Example #1
0
def assertTodo0003(todo):
    '''
    {
        "typeId": "hall.wifikey.promote"
    }
    '''
    assertBase.assertDictMustKeys(todo, ['typeId'])
Example #2
0
def assertTodo0005(todo):
    '''
    {
        "typeId": "hall.download",
        "url": "http://www.tuyoo.com/PrivacyPolicy"
    }
    '''
    assertBase.assertDictMustKeys(todo, ['typeId', 'url'])
    assertBase.assertMustHttp(todo, 'url')
Example #3
0
def assertTodo0001(todo):
    '''
    {
        "actId": "activity_general_btn_qiku_ddz_match_1023",
        "typeId": "hall.goto.activity.byid"
    }
    '''
    assertBase.assertDictMustKeys(todo, ['typeId', 'actId'])
    assertBase.assertMustStr(todo, 'actId')
Example #4
0
def assertTodo0004(todo):
    '''
    {
        "typeId": "hall.goto.shop",
        "subStore" : "coin"
    }
    '''
    assertBase.assertDictMustKeys(todo, ['typeId', 'subStore'])
    # TODO subStore的枚举类型暂时不完整
    assertBase.assertEnumValue(todo, 'subStore', ['coin', 'activity'])
Example #5
0
def assertTodo0002(todo):
    '''
    {
        "enter_param": {
            "pluginParams": {
                "gameType": 3
            },
            "type": "roomlist"
        },
        "gameId": 6,
        "typeId": "hall.goto.enter.game"
    }
    '''
    assertBase.assertDictMustKeys(todo, ['typeId', 'gameId', 'enter_param'])
    assertBase.assertMustDict(todo, 'enter_param')
    assertBase.assertEnumValue(todo, 'gameId', mainconf.GAMEIDS)