예제 #1
0
def test_incorrect_args():
    try:
        ApiParam("@apiParam")
    except ApidocParseError:
        assert True
        return
    assert False
예제 #2
0
def test_correct_without_group():
    obj = ApiParam('@apiParam {Number{241}="asaas","bab"} limit This is it')
    assert obj.type == "Number"
    assert obj.type_size == "241"
    assert obj.type_allowed_values == '"asaas","bab"'
    assert obj.field == "limit"
    assert obj.description == "This is it"
예제 #3
0
def test_correct_field_default():
    obj = ApiParam("@apiParam [limit=bobs]")
    assert obj.field == "limit"
    assert obj.field_default == "bobs"
    assert obj.field_required
예제 #4
0
def test_correct_field_only():
    obj = ApiParam("@apiParam limit")
    assert obj.field == "limit"
예제 #5
0
def test_correct_without_group_or_type():
    obj = ApiParam("@apiParam limit This is it")
    assert obj.field == "limit"
    assert obj.description == "This is it"