def test_add_link():
    m = GenericModel()
    m.add_link('http://example.com/1')
    m.add_link('http://example.com/2', note='xyz')
    assert m.links == [{'url': 'http://example.com/1', 'note': ''},
                       {'url': 'http://example.com/2', 'note': 'xyz'}]
dataset/ETHPy150Open opencivicdata/pupa/pupa/tests/scrape/test_model_basics.py/test_add_link/original