Skip to content

Commit

Permalink
Include GCS auth in tox tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ugyballoons committed Jun 28, 2023
1 parent 0a80318 commit 9312f3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/rubintv/templates/camera.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "_layout.jinja" %}
{% block pagetitle %}
{{ camera.title }}
{% endblock pagetitle %}

{% block breadcrumb %}
<a href="{{ url_for('home') }}">Home</a>>
<p>{{ location.title }}</p>
{% endblock breadcrumb %}
4 changes: 3 additions & 1 deletion tests/handlers/external_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from httpx import AsyncClient

from rubintv.handlers.helpers import find_first
from rubintv.models import Location
from rubintv.models_init import ModelsInitiator

m = ModelsInitiator()
Expand All @@ -34,8 +35,9 @@ async def test_get_location(client: AsyncClient) -> None:
"""Test that location page has links to cameras"""
location_name = "summit"
location = await find_first(m.locations, "name", location_name)
groups = location.camera_groups.values()
assert type(location) == Location

groups = location.camera_groups.values()
camera_names = list(chain(*groups))
response = await client.get(f"/rubintv/{location_name}")
html = await response.aread()
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ description = Run pytest against {envname}.
deps =
-r{toxinidir}/requirements/main.txt
-r{toxinidir}/requirements/dev.txt
passenv = GOOGLE_APPLICATION_CREDENTIALS
commands =
pytest --cov=rubintv --cov-branch --cov-report= {posargs}

Expand Down

0 comments on commit 9312f3f

Please sign in to comment.