def METHOD_NAME(self, p1):
    items = [
        Installed(
            Installable("foo", "1.1", "", "", "", []),
            Distribution(project_name="foo", version="1.0"),
        ),
    ]
    w = AddonManagerDialog()
    w.setItems(items)
    # drop an addon already in the list
    pkginfo = "Metadata-Version: 1.0\nName: foo\nVersion: 0.9"
    with addon_archive(pkginfo) as fn:
        event = self._drop_event(QUrl.fromLocalFile(fn))
        w.dropEvent(event)
    items = w.items()
    self.assertEqual(1, len(items))
    self.assertEqual("0.9", items[0].installable.version)
    self.assertEqual(True, items[0].installable.force)
    state = [(Upgrade, items[0])]
    self.assertSequenceEqual(state, w.itemState())
    # drop a new addon
    pkginfo = "Metadata-Version: 1.0\nName: foo2\nVersion: 0.8"
    with addon_archive(pkginfo) as fn:
        event = self._drop_event(QUrl.fromLocalFile(fn))
        w.dropEvent(event)
    items = w.items()
    self.assertEqual(2, len(items))
    self.assertEqual("0.8", items[1].installable.version)
    self.assertEqual(True, items[1].installable.force)
    state = state + [(Install, items[1])]
    self.assertSequenceEqual(state, w.itemState())