def test_token(self): with override_settings(SLACK_TOKEN='foo'): response = self.send_command('/foo', token='baz') self.assertContains( response, 'Invalid or missing slack token.', status_code=400)