def test_add_discard(self):
    x = self.app.ResultSet([])
    x.add(self.app.AsyncResult('1'))
    self.assertIn(self.app.AsyncResult('1'), x.results)
    x.discard(self.app.AsyncResult('1'))
    x.discard(self.app.AsyncResult('1'))
    x.discard('1')
    self.assertNotIn(self.app.AsyncResult('1'), x.results)
    x.update([self.app.AsyncResult('2')])
def test_add_discard(self):
    x = self.app.ResultSet([])
    x.add(self.app.AsyncResult('1'))
    self.assertIn(self.app.AsyncResult('1'), x.results)
    x.discard(self.app.AsyncResult('1'))
    x.discard(self.app.AsyncResult('1'))
    x.discard('1')
    self.assertNotIn(self.app.AsyncResult('1'), x.results)
    x.update([self.app.AsyncResult('2')])