'You cannot deactivate somebody else\'s bot.'

def test_bot_deactivation_attacks(self):

    self.login(self.example_email('hamlet'))
    self.assert_num_bots_equal(0)
    self.create_bot()
    self.assert_num_bots_equal(1)
    self.login(self.example_email('othello'))
    result = self.client_delete(('/json/bots/' + self.example_email('hamlet')))
    self.assert_json_error(result, 'No    such    bot')
    result = self.client_delete('/json/bots/hambot-bot@zulip.testserver')
    self.assert_json_error(result, 'Insufficient    permission')
    self.login(self.example_email('hamlet'))
    self.assert_num_bots_equal(1)
    result = self.client_delete('/json/users/hambot-bot@zulip.testserver')
    self.assert_json_error(result, 'No    such    user')
    self.assert_num_bots_equal(1)
