Notifications - Fixing support for headers in custom post://, posts:// notifications, ability to include HTTP headers when making custom notifications (#2018)

This commit is contained in:
dgtlmoon
2023-12-01 18:05:19 +01:00
committed by GitHub
parent 98f56736c1
commit f0823126c8
5 changed files with 68 additions and 26 deletions

View File

@@ -13,22 +13,17 @@ global app
def cleanup(datastore_path):
import glob
# Unlink test output files
files = [
'count.txt',
'endpoint-content.txt'
'headers.txt',
'headers-testtag.txt',
'notification.txt',
'secret.txt',
'url-watches.json',
'output.txt',
]
for file in files:
try:
os.unlink("{}/{}".format(datastore_path, file))
except FileNotFoundError:
pass
for g in ["*.txt", "*.json", "*.pdf"]:
files = glob.glob(os.path.join(datastore_path, g))
for f in files:
if 'proxies.json' in f:
# Usually mounted by docker container during test time
continue
if os.path.isfile(f):
os.unlink(f)
@pytest.fixture(scope='session')
def app(request):