def test_accumulate_updates_basic(self): pl = ProxyList() pl.setup(accumulate_updates=True) # load initial list path = self.generate_plist_file('foo:1\nbar:1') pl.set_source('file', location=path) self.assertEqual(2, len(pl.proxy_list)) # load list with one new and one old proxies with open(path, 'w') as out: out.write('foo:1\nbaz:1') pl.reload(force=True) self.assertEqual(3, len(pl.proxy_list))