Esempio n. 1
0
def test_edit_todo():
    todo.todos = [
        {
            'title': 'make some stuff',
            'description': 'This is an important test',
            'level': 'IMPORTANT'
        }
    ]
    # Edit this todo item
    response = todo.edit_todo(todo.todos, which="1", title="", description="Stuff needs to be programmed prperly", level="")

    assert response == "Edited todo #1", response
    assert todo.todos[0]['title'] == "make some stuff"
    assert todo.todos[0]['description'] == "Stuff needs to be programmed prperly"
    assert todo.todos[0]['level'] == "IMPORTANT"

    print "OK - edit todo"
Esempio n. 2
0
def test_edit_importance():
    todo.todos = [
        {
            'title': 'djkajs owjo',
            'description': 'This is an medium test',
            'level': 'Medium'
        },
        {
            'title': 'Test another medium todo',
            'description': 'This is another medium test',
            'level': 'Medium'
        }
    ]
    # Edit the second todo item's importance
    response = todo.edit_todo(todo.todos, which="2", title="", description="", level="Important")

    assert todo.todos[0]['level'] == "IMPORTANT"
    assert todo.todos[1]['level'] == "Medium"

    print "OK - edit importance"
Esempio n. 3
0
def test_edit_importance():
    todo.todos = [
        { 'title' : 'test medium todo',
          'description' : 'This is a medium todo',
          'level' : 'medium'
        },
        { 'title' : 'test another medium todo',
          'description' : 'This is another medium todo',
          'level' : 'medium'
        },
    ]
    
    response = todo.edit_todo(todo.todos,
        which="2",
        title="",
        description="",
        level="Important")

    assert todo.todos[0]['level'] == "IMPORTANT"
    assert todo.todos[1]['level'] == "medium"
    
    print "ok - edit importance"
Esempio n. 4
0
def test_edit_todo():
    todo.todos = [
        { 'title' : "Make some stuff",
          'description' : 'This is an important test',
          'level' : 'IMPORTANT'
        },
    ]
    
    response = todo.edit_todo(todo.todos,
        which="1",
        title="",
        description="Stuff needs to be programmed properly",
        level="")

    assert response == "Edited todo", response
    assert len(todo.todos) == 1
    assert todo.todos[0]['title'] == "Make some stuff"
    assert (todo.todos[0]['description'] ==
            "Stuff needs to be programmed properly")
    assert todo.todos[0]['level'] == "IMPORTANT"

    print "ok - edit todo"
Esempio n. 5
0
def test_edit_todo():
    todo.todos = [
        {
            'title': "Make some stuff",
            'description': 'This is an important test',
            'level': 'IMPORTANT'
        },
    ]

    response = todo.edit_todo(todo.todos,
                              which='1',
                              title='',
                              description='Stuff needs to be programmed properly',
                              level='')

    assert response == 'Edited todo #1', response
    assert len(todo.todos) == 1
    assert todo.todos[0]['title'] == "Make some stuff"
    assert todo.todos[0]['description'] == 'Stuff needs to be programmed properly'
    assert todo.todos[0]['level'] == 'IMPORTANT'

    print "ok - edit todo"
Esempio n. 6
0
def test_edit_importance():
    todo.todos = [
        {
            'title': "test medium todo",
            'description': 'This is a medium todo',
            'level': 'medium'
        },
        {
            'title': "test another medium todo",
            'description': 'This is another medium todo',
            'level': 'medium'
        },
    ]

    response = todo.edit_todo(todo.todos,
                              which='2',
                              title='',
                              description='',
                              level='Important')

    assert todo.todos[0]['level'] == 'IMPORTANT'
    assert todo.todos[1]['level'] == 'medium'

    print "ok - edit importance"
Esempio n. 7
0
def test_edit_importance():
    todo.todos = [
        {
            'title': "test medium todo",
            'description': 'This is a medium todo',
            'level': 'medium'
        },
        {
            'title': "test another medium todo",
            'description': 'This is another medium todo',
            'level': 'medium'
        },
    ]

    response = todo.edit_todo(todo.todos,
                              which='2',
                              title='',
                              description='',
                              level='Important')

    assert todo.todos[0]['level'] == 'IMPORTANT'
    assert todo.todos[1]['level'] == 'medium'

    print "ok - edit importance"
Esempio n. 8
0
def test_edit_todo():
    todo.todos = [
        {
            'title': "Make some stuff",
            'description': 'This is an important test',
            'level': 'IMPORTANT'
        },
    ]

    response = todo.edit_todo(
        todo.todos,
        which='1',
        title='',
        description='Stuff needs to be programmed properly',
        level='')

    assert response == 'Edited todo #1', response
    assert len(todo.todos) == 1
    assert todo.todos[0]['title'] == "Make some stuff"
    assert todo.todos[0][
        'description'] == 'Stuff needs to be programmed properly'
    assert todo.todos[0]['level'] == 'IMPORTANT'

    print "ok - edit todo"