Repository: opsdroid/opsdroid

Issue:
Cisco WebEx Teams connector doesn't start
# Error

```
INFO opsdroid.logging: ========================================
INFO opsdroid.logging: Started opsdroid 0+unknown.
WARNING opsdroid: 'welcome-message: true/false' is missing in configuration.yaml
WARNING opsdroid.loader: No databases in configuration. This will cause skills which store things in memory to lose data when opsdroid is restarted.
INFO opsdroid.loader: Cloning hello from remote repository.
Traceback (most recent call last):
  File "/usr/local/bin/opsdroid", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/opsdroid/cli/start.py", line 42, in start
    opsdroid.run()
  File "/usr/local/lib/python3.7/site-packages/opsdroid/core.py", line 158, in run
    self.sync_load()
  File "/usr/local/lib/python3.7/site-packages/opsdroid/core.py", line 177, in sync_load
    self.eventloop.run_until_complete(self.load())
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.7/site-packages/opsdroid/core.py", line 185, in load
    await self.start_connectors(self.modules["connectors"])
  File "/usr/local/lib/python3.7/site-packages/opsdroid/core.py", line 319, in start_connectors
    await self.eventloop.create_task(connector.connect())
  File "/usr/local/lib/python3.7/site-packages/opsdroid/connector/webexteams/__init__.py", line 53, in connect
    await self.subscribe_to_rooms()
  File "/usr/local/lib/python3.7/site-packages/opsdroid/connector/webexteams/__init__.py", line 99, in subscribe_to_rooms
    secret=self.secret,
  File "/usr/local/lib/python3.7/site-packages/webexteamssdk/api/webhooks.py", line 159, in create
    json_data = self._session.post(API_ENDPOINT, json=post_data)
  File "/usr/local/lib/python3.7/site-packages/webexteamssdk/restsession.py", line 401, in post
    **kwargs)
  File "/usr/local/lib/python3.7/site-packages/webexteamssdk/restsession.py", line 258, in request
    check_response_code(response, erc)
  File "/usr/local/lib/python3.7/site-packages/webexteamssdk/utils.py", line 220, in check_response_code
    raise ApiError(response)
webexteamssdk.exceptions.ApiError: [400] Bad Request - POST failed: HTTP/1.1 400 Bad Request (url = https://webhook-engine-a.wbx2.com/webhook-engine/api/v1/webhooks, request/response TrackingId = ROUTER_5ECD21B0-63B3-01BB-00D6-B2CAA80F00D6, error = 'Invalid targetUrl: Illegal character in path at index 0: <function Url at 0x7fd36ce31f80>/connector/webexteams')
```
# How to reproduce

* Create `configuration.yaml` with the following content:

```
connectors:
  webexteams:
    token: MYBOTACCESSTOKEN
    webhook-url: https://my-webhook-url.com
    # Seem that webhook-url is not relevant for the error message
skills:
  hello:
```

* Create `debug.sh` with the following content:

```
docker run --rm -ti -p 8080:8080 \
	-v `pwd`/configuration.yaml:/root/.config/opsdroid/configuration.yaml:ro \
	opsdroid/opsdroid:v0.18.0 sh
```

* `chmod +x debug.sh`
* `./debug.sh`
* (in the container) `opsdroid start`




Discussion:

Resolving patch:
diff --git a/opsdroid/connector/webexteams/__init__.py b/opsdroid/connector/webexteams/__init__.py
--- a/opsdroid/connector/webexteams/__init__.py
+++ b/opsdroid/connector/webexteams/__init__.py
@@ -14,7 +14,7 @@
 
 
 _LOGGER = logging.getLogger(__name__)
-CONFIG_SCHEMA = {Required("webhook-url"): Url, Required("token"): str}
+CONFIG_SCHEMA = {Required("webhook-url"): Url(), Required("token"): str}
 
 
 class ConnectorWebexTeams(Connector):


Test patch:
diff --git a/tests/test_connector_webexteams.py b/tests/test_connector_webexteams.py
--- a/tests/test_connector_webexteams.py
+++ b/tests/test_connector_webexteams.py
@@ -24,6 +24,10 @@ def test_init(self):
         self.assertEqual("webexteams", connector.name)
         self.assertEqual("opsdroid", connector.bot_name)
 
+    def test_webhook_url_is_valid(self):
+        connector = ConnectorWebexTeams({"webhook-url": "https://example.com"})
+        assert connector.config.get("webhook-url").startswith("https")
+
     def test_missing_api_key(self):
         """Test that creating without an API without config raises an error."""
         with self.assertRaises(TypeError):