fix: adiciona cache-busting nos arquivos estaticos (css/js) para evitar layout desatualizado apos deploy
This commit is contained in:
@@ -119,3 +119,12 @@ def test_logout_funciona_depois_de_visitar_clientes(monkeypatch):
|
||||
|
||||
resposta_logout = client.post("/logout", data={"csrf_token": token_cookie}, follow_redirects=False)
|
||||
assert resposta_logout.status_code == 303
|
||||
|
||||
|
||||
def test_estilo_css_tem_versao_de_cache_busting():
|
||||
resposta = client.get("/login")
|
||||
assert resposta.status_code == 200
|
||||
import re
|
||||
m = re.search(r'/static/estilo\.css\?v=(\d+)', resposta.text)
|
||||
assert m is not None, "link do estilo.css deveria ter ?v=<versao>"
|
||||
assert m.group(1) != "0"
|
||||
|
||||
Reference in New Issue
Block a user