'Calling POST /json/users/me/subscriptions should successfully add
streams, and should determine which are new subscriptions vs
which were already subscribed. We add 2 new streams to the
list of subscriptions and confirm the right number of events
are generated.'

def test_successful_subscriptions_add_with_announce(self):

    self.assertNotEqual(len(self.streams), 0)
    add_streams = [u'Verona2', u'Denmark5']
    self.assertNotEqual(len(add_streams), 0)
    events = []
    other_params = {'announce': 'true'}
    notifications_stream = get_stream(self.streams[0], self.test_realm)
    self.test_realm.notifications_stream = notifications_stream
    self.test_realm.save()
    cache.cache_delete(cache.user_profile_by_email_cache_key(self.test_email))
    with tornado_redirected_to_list(events):
        self.helper_check_subs_before_and_after_add((self.streams + add_streams), other_params, add_streams, self.streams, self.test_email, (self.streams + add_streams), self.test_realm)
    self.assertEqual(len(events), 9)
