Skip to content

Commit

Permalink
Formatting fixes for failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nzlosh committed Feb 9, 2022
1 parent fdc453e commit d09a5d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion errbot/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ def get_doc(self, command: Callable) -> str:
if self.prefix == "!":
return command.__doc__
ununderscore_keys = (m.replace("_", " ") for m in self.all_commands.keys())
pat = re.compile(fr'!({"|".join(ununderscore_keys)})')
pat = re.compile(rf'!({"|".join(ununderscore_keys)})')
return re.sub(pat, self.prefix + "\1", command.__doc__)

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion errbot/core_plugins/webserver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import os
import sys
import logging
from json import loads
from random import randrange
from threading import Thread
Expand Down
13 changes: 5 additions & 8 deletions tests/webhooks_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,11 @@ def test_generate_certificate_creates_usable_cert(webhook_testbot):
requests.packages.urllib3.exceptions.InsecureRequestWarning
)

assert (
requests.post(
"https://localhost:{}/webhook1".format(WEBSERVER_SSL_PORT),
JSONOBJECT,
verify=False,
).text
== repr(json.loads(JSONOBJECT))
)
assert requests.post(
"https://localhost:{}/webhook1".format(WEBSERVER_SSL_PORT),
JSONOBJECT,
verify=False,
).text == repr(json.loads(JSONOBJECT))


def test_custom_headers_and_status_codes(webhook_testbot):
Expand Down

0 comments on commit d09a5d1

Please sign in to comment.