def testReuseExisting(self):
    item1 = Item().createItem('to be reused', creator=self.users[0], folder=self.publicFolder)
    item2 = Item().createItem('to be reused', creator=self.users[0], folder=self.publicFolder)
    item3 = Item().createItem('to be reused', creator=self.users[0], folder=self.publicFolder, reuseExisting=True)
    self.assertNotEqual(item1['_id'], item2['_id'])
    self.assertEqual(item1['_id'], item3['_id'])
    self.assertEqual(item2['name'], 'to be reused (1)')
    self.assertEqual(item3['name'], 'to be reused')
def testReuseExisting(self):
    item1 = Item().createItem('to be reused', creator=self.users[0], folder=self.publicFolder)
    item2 = Item().createItem('to be reused', creator=self.users[0], folder=self.publicFolder)
    item3 = Item().createItem('to be reused', creator=self.users[0], folder=self.publicFolder, reuseExisting=True)
    self.assertNotEqual(item1['_id'], item2['_id'])
    self.assertEqual(item1['_id'], item3['_id'])
    self.assertEqual(item2['name'], 'to be reused (1)')
    self.assertEqual(item3['name'], 'to be reused')