import json


def get_fake_task(
    _id='',
    alias='',
    attribute='str',
    notes='notes',
    text='text',
    _type='habit',
    completed=False,
    value=0):
    """Generates test task data as both a dictionary and json"""

    task = \
    {
        '_id': _id,
        'alias': alias,
        'attribute': attribute,
        'notes': notes,
        'priority': 1,
        'text': text,
        'type': _type,
        'value': value,
        'completed': completed,
    }

    _json = json.dumps({'data': task})

    return (task, _json)