This repository has been archived on 2023-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
python-blog/blog/tests/test_robots.py

7 lines
223 B
Python

def test_robots_txt(client):
res = client.get("/robots.txt")
assert res.status_code == 200
assert res["Content-Type"] == "text/plain"
content = res.content.decode("utf-8")
assert "User-Agent" in content