Fix tests
Committed 05bb11
--- a/test_app.py
+++ b/test_app.py
+import web
+
from webint_system import app
-def test_index():
+def test_app():
+ web.tx.user.is_owner = True
response = app.get("")
assert response.status == "200 OK"
-
- def get_headings(h):
- return [_.text for _ in response.dom.select(f"h{h}")]
-
- assert get_headings(2) == ["Addresses", "Software", "Settings"]
- assert get_headings(3) == ["Clearnet", "Darknet", "Routes", "Wrappers"]
+ assert [_.text for _ in response.dom.select(f"h2, h3")] == [
+ "Addresses",
+ "Domain Name System (DNS)",
+ "The Onion Router (tor)",
+ "Software",
+ "Routes",
+ "Wrappers",
+ "Settings",
+ ]