Beispiel #1
0
def test_mark_data(db):
    db = StudentDB()  # init class
    db.connect('data.json')
    scott_data = db.get_data('Mark')
    assert scott_data['id'] == 2
    assert scott_data['name'] == 'Mark'
    assert scott_data['result'] == 'fail'
Beispiel #2
0
def test_scott_data(db):
    db = StudentDB()  # init class
    db.connect('data.json')
    scott_data = db.get_data('Scott')
    assert scott_data['id'] == 1
    assert scott_data['name'] == 'Scott'
    assert scott_data['result'] == 'pass'