def post_put_part_get_and_compare(valid_bear, param, value):
    bears_db = BearsDB()
    bear_id = bears_db.create_bear(valid_bear)
    valid_param = {param: value}
    bears_db.update_bear(bear_id, valid_param)
    bear = bears_db.read_bear(bear_id)
    assert bear.get(param) == value
def post_put_whole_get_and_compare(valid_bear, param, value):
    bears_db = BearsDB()
    bear_id = bears_db.create_bear(valid_bear)
    valid_bear[param] = value
    bears_db.update_bear(bear_id, valid_bear)
    bear = bears_db.read_bear(bear_id)
    assert bear.get(param) == value
Beispiel #3
0
def test_successfully_creates_duplicate_valid_bear(valid_bear):
    bears_db = BearsDB()
    bears_db.create_bear(valid_bear)
    bears_db.create_bear(valid_bear)
Beispiel #4
0
def test_successfully_creates_bear_with_valid_params_and_unknown_param(
        valid_bear):
    valid_bear["unknown"] = "param"
    bears_db = BearsDB()
    bears_db.create_bear(valid_bear)