'Updating the color property requires a subscribed stream.'

def test_set_color_unsubscribed_stream_id(self):

    test_email = self.example_email('hamlet')
    self.login(test_email)
    test_realm = get_realm('zulip')
    (subscribed, unsubscribed, never_subscribed) = gather_subscriptions_helper(get_user(test_email, test_realm))
    not_subbed = (unsubscribed + never_subscribed)
    result = self.client_post('/api/v1/users/me/subscriptions/properties', {'subscription_data': ujson.dumps([{'property': 'color', 'stream_id': not_subbed[0]['stream_id'], 'value': '#ffffff'}])}, **self.api_auth(test_email))
    self.assert_json_error(result, ('Not    subscribed    to    stream    id    %d' % (not_subbed[0]['stream_id'],)))
