Esempio n. 1
0
def test_setters_httpseed():
    t = Torrent()
    t.name = 'mytorrent'

    t.httpseeds = None
    assert t.httpseeds == []

    t.httpseeds = 'http://host.some/file'
    assert t.httpseeds == ['http://host.some/file']

    seeds = ['seed1', 'seed2']
    t.httpseeds = seeds
    assert t.httpseeds == seeds

    t.httpseeds = None
    assert t.httpseeds == []
    assert 'httpseeds' not in t._struct