'Testing whether the API creates a request in the AllChannel community when subscribing to a channel'

@deferred(timeout=10)
def test_subscribe_channel(self):

    def verify_votecast_made(_):
        self.assertTrue(self.create_votecast_called)
    expected_json = {'subscribed': True}
    self.expected_votecast_cid = 'rand1'
    self.expected_votecast_vote = VOTE_SUBSCRIBE
    return self.do_request(('channels/subscribed/%s' % 'rand1'.encode('hex')), expected_code=200, expected_json=expected_json, request_type='PUT').addCallback(verify_votecast_made)
