'Testing whether the API returns error 404 when unsubscribing from an already unsubscribed channel'

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

    expected_json = {'error': NOT_SUBSCRIBED_RESPONSE_MSG}
    self.insert_channel_in_db('rand1', 42, 'Test    channel', 'Test    description')
    return self.do_request(('channels/subscribed/%s' % 'rand1'.encode('hex')), expected_code=404, expected_json=expected_json, request_type='DELETE')
