ooici/coi-services — pull request #533 by swarbhanu (2013-02-05 21:08:04+00:00)
Title: Adds assertions in test_activate_instrument.py to check that subscriptions for two different users

* We verify the computed attributes holding the subscription in extended product and extended instrument. We check that when we create notifications for another user, there is no mix up and the computed attributes are correct.

* Since UNS uses elastic search to fetch subscriptions in the methods, get_subscriptions() and get_subscriptions_attribute(), we need to turn on elastic search in the test, test_activate_instrument, to completely verify the correct computation of the computed attribute for user subscriptions.

We do this using a config. We set config.bootstrap.use_es = True, and pass this config when starting the container with r2deploy.

```
config = DotDict()
config.bootstrap.use_es = True
self.container.start_rel_from_url('res/deploy/r2deploy.yml', config)
```

* We cleanup elastic search indexes using addCleanup()