forked from retoor/devplacepy
feat: add TTLCache for get_cache_version and TEMPLATE_AUTO_RELOAD config with Makefile worker count variables
This commit is contained in:
+5
-5
@@ -721,7 +721,7 @@ class DevPlaceUser(HttpUser):
|
||||
"/posts/create", data=data, catch_response=True, name="posts/create"
|
||||
) as resp:
|
||||
if resp.status_code == 200 and resp.history:
|
||||
m = re.search(r"/posts/(\S+)", resp.url)
|
||||
m = re.search(r"/posts/(\S+)", resp.url or "")
|
||||
if m:
|
||||
slug = m.group(1)
|
||||
if slug not in POST_SLUGS:
|
||||
@@ -759,7 +759,7 @@ class DevPlaceUser(HttpUser):
|
||||
catch_response=True,
|
||||
name="projects/create",
|
||||
) as resp:
|
||||
m = re.search(r"/projects/(\S+)", resp.url)
|
||||
m = re.search(r"/projects/(\S+)", resp.url or "")
|
||||
if resp.status_code == 200 and m:
|
||||
slug = m.group(1)
|
||||
if slug not in PROJECT_SLUGS:
|
||||
@@ -782,7 +782,7 @@ class DevPlaceUser(HttpUser):
|
||||
catch_response=True,
|
||||
name="gists/create",
|
||||
) as resp:
|
||||
m = re.search(r"/gists/(\S+)", resp.url)
|
||||
m = re.search(r"/gists/(\S+)", resp.url or "")
|
||||
if resp.status_code == 200 and m:
|
||||
slug = m.group(1)
|
||||
if slug not in GIST_SLUGS:
|
||||
@@ -1736,7 +1736,7 @@ class AnonymousUser(HttpUser):
|
||||
catch_response=True,
|
||||
name="votes/post/guest-redirect",
|
||||
) as resp:
|
||||
if "/auth/login" in resp.url:
|
||||
if "/auth/login" in (resp.url or ""):
|
||||
resp.success()
|
||||
else:
|
||||
resp.failure(f"guest vote not redirected to login: {resp.url}")
|
||||
@@ -1748,7 +1748,7 @@ class AnonymousUser(HttpUser):
|
||||
catch_response=True,
|
||||
name="guarded/guest-redirect",
|
||||
) as resp:
|
||||
if "/auth/login" in resp.url:
|
||||
if "/auth/login" in (resp.url or ""):
|
||||
resp.success()
|
||||
else:
|
||||
resp.failure(f"guarded GET not redirected to login: {resp.url}")
|
||||
|
||||
Reference in New Issue
Block a user