Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /lnbits_lnbits /tests /unit /test_node_template.py
| import pytest | |
| from starlette.requests import Request | |
| from lnbits.helpers import template_renderer | |
| def test_homepage_renders_node_template_with_client_bindings(settings, bundle_assets): | |
| settings.bundle_assets = bundle_assets | |
| request = Request( | |
| { | |
| "type": "http", | |
| "path": "/", | |
| "headers": [], | |
| "scheme": "http", | |
| "server": ("testserver", 80), | |
| "query_string": b"", | |
| } | |
| ) | |
| response = template_renderer().TemplateResponse( | |
| request, "base.html", {"public": True} | |
| ) | |
| assert response.status_code == 200 | |
| html = bytes(response.body).decode() | |
| assert 'id="page-node"' in html | |
| # Jinja must leave these values for Vue to evaluate in the browser. | |
| assert "phoenixd.version ||" in html | |
| assert "phoenixd.blockheight ??" in html | |
| assert 'v-text="phoenixd.fee_credit_sat"' in html | |
Xet Storage Details
- Size:
- 958 Bytes
- Xet hash:
- 738fc36a15e7a089315b38ef00d92c39e2ccaf92a11424176d232818095c2891
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.