'Testing whether a DuplicateDownloadException is raised when a download is added twice'

@raises(DuplicateDownloadException)
def test_add_duplicate_download(self):

    self.lm.downloads = {'abcd': None}
    tdef = TorrentDef()
    tdef.metainfo_valid = True
    tdef.infohash = 'abcd'
    self.lm.add(tdef, DefaultDownloadStartupConfig.getInstance())
