コード例 #1
0
ファイル: steps_rc.py プロジェクト: virginiacc/owning-a-home
def step(context, param_name):
    context.json_data = json.loads(context.response.text)
    assert_that(context.json_data.get(param_name), is_not(none()))
    assert_that(context.json_data[param_name][0], contains_string('required'))
コード例 #2
0
ファイル: steps_rc.py プロジェクト: OrlandoSoto/owning-a-home
def step(context, param_name):
    context.json_data = json.loads(context.response.text)
    assert_that(context.json_data.get(param_name), is_not(none()))
    assert_that(context.json_data[param_name][0], contains_string('required'))
コード例 #3
0
ファイル: steps_mi.py プロジェクト: virginiacc/owning-a-home
def step(context, html_text):
    context.json_data = json.loads(context.response.text)
    context.logger.debug("json_data html_text: %s" % context.json_data)
    assert_that(context.json_data.get('non_field_errors'), is_not(none()))
    assert_that(context.json_data['non_field_errors'][0],
                contains_string(html_text))
コード例 #4
0
ファイル: steps_mi.py プロジェクト: OrlandoSoto/owning-a-home
def step(context, html_text):
    context.json_data = json.loads(context.response.text)
    context.logger.debug("json_data html_text: %s" % context.json_data)
    assert_that(context.json_data.get('non_field_errors'), is_not(none()))
    assert_that(context.json_data['non_field_errors'][0], contains_string(html_text))