Skip to content

Commit bb119ec

Browse files
renzonrenzon
authored andcommitted
Added podcast link
#close 885
1 parent ec66750 commit bb119ec

7 files changed

Lines changed: 54 additions & 5 deletions

File tree

.pytest_cache/v/cache/lastfailed

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{}
1+
{
2+
"pythonpro/core/tests/test_view_podcast.py::test_podcast_link": true
3+
}

.pytest_cache/v/cache/nodeids

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,16 @@
6767
"pythonpro/core/tests/test_view_home.py::test_lead_form[<input type=\"text\" name=\"FNAME\"]",
6868
"pythonpro/core/tests/test_view_home.py::test_lead_form[<input type=\"email\" name=\"EMAIL\"]",
6969
"pythonpro/core/tests/test_view_home.py::test_lead_form[<button type=\"submit\"]",
70-
"pythonpro/core/tests/test_view_home.py::test_subscription_today_date[day-28]",
71-
"pythonpro/core/tests/test_view_home.py::test_subscription_today_date[month-11]",
72-
"pythonpro/core/tests/test_view_home.py::test_subscription_today_date[year-2018]",
70+
"pythonpro/core/tests/test_view_home.py::test_subscription_today_date[day-22]",
71+
"pythonpro/core/tests/test_view_home.py::test_subscription_today_date[month-01]",
72+
"pythonpro/core/tests/test_view_home.py::test_subscription_today_date[year-2019]",
7373
"pythonpro/core/tests/test_view_home.py::test_forum_tab_is_not_present",
7474
"pythonpro/core/tests/test_view_home.py::test_forum_tab_is_present",
7575
"pythonpro/core/tests/test_view_home.py::test_payment_link_is_present",
7676
"pythonpro/core/tests/test_view_home.py::test_payment_link_is_not_present",
77+
"pythonpro/core/tests/test_view_podcast.py::test_status_code",
78+
"pythonpro/core/tests/test_view_podcast.py::test_link_on_home",
79+
"pythonpro/core/tests/test_view_podcast.py::test_podcast_link",
7780
"pythonpro/core/tests/test_view_profile.py::test_profile_not_logged_user",
7881
"pythonpro/core/tests/test_view_profile.py::test_profile_status_code",
7982
"pythonpro/core/tests/test_view_profile.py::test_profile_first_name",
@@ -162,7 +165,7 @@
162165
"pythonpro/payments/tests.py::test_content_subscription_closed",
163166
"pythonpro/payments/tests.py::test_leads_form_when_subscription_closed",
164167
"pythonpro/payments/tests.py::test_pagseguro_form[<form action=\"https://pagseguro.uol.com.br/pre-approvals/request.html\" method=\"post\">]",
165-
"pythonpro/payments/tests.py::test_pagseguro_form[<input type=\"hidden\" name=\"code\" value=\"28B4C9D65353AD8554943F8ED0585371\"/>]",
168+
"pythonpro/payments/tests.py::test_pagseguro_form[<input type=\"hidden\" name=\"code\" value=\"5DCC47977676066FF44C9F9310EF0392\"/>]",
166169
"pythonpro/payments/tests.py::test_pagseguro_form[name=\"submit\"]",
167170
"pythonpro/payments/tests.py::test_thanks_status_code",
168171
"pythonpro/promos/tests/test_views.py::test_video_status",

pythonpro/core/templates/core/base.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
<li class="nav-item">
6868
<a class="nav-link" href="{% url 'core:tech_talks' %}">Tech Talks</a>
6969
</li>
70+
<li class="nav-item">
71+
<a class="nav-link" href="{% url 'core:podcast' %}">Podcast</a>
72+
</li>
7073
</ul>
7174
{% if user.is_authenticated %}
7275
<ul class="navbar-nav ">
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends 'core/base.html' %}
2+
{% load static %}
3+
{% block body %}
4+
<div class="container mt-5">
5+
<div class="row">
6+
<div class="col">
7+
<h1 class="mb-3">RenzoPro Cast - Podcast pessoal do Renzo</h1>
8+
<p class="mb-0">Podcast onde Renzo aborda asssuntos relacionados a carreira, negócio e empreededorismo.<br/>
9+
</p>
10+
<iframe class="mt-2 mb-4" src="https://anchor.fm/renzoprocast/embed" height="102px" width="400px" frameborder="0" scrolling="no"></iframe>
11+
</div>
12+
</div>
13+
</div>
14+
{% endblock body %}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import pytest
2+
from django.urls import reverse
3+
4+
from pythonpro.django_assertions import dj_assert_contains
5+
6+
7+
@pytest.fixture
8+
def resp(client):
9+
return client.get(reverse('core:podcast'), secure=True)
10+
11+
12+
def test_status_code(resp):
13+
assert 200 == resp.status_code
14+
15+
16+
def test_link_on_home(client):
17+
resp = client.get('/', secure=True)
18+
dj_assert_contains(resp, reverse('core:podcast'))
19+
20+
21+
def test_podcast_link(resp):
22+
dj_assert_contains(resp, 'https://anchor.fm/renzoprocast/embed')

pythonpro/core/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
urlpatterns = [
77
path('', views.index, name='index'),
88
path('tech-talks', views.teck_talks, name='tech_talks'),
9+
path('podcast', views.podcast, name='podcast'),
910
path('obrigado', views.thanks, name='thanks'),
1011
path('perfil', views.profile, name='profile'),
1112
path('perfil/nome', views.profile_name, name='profile_name'),

pythonpro/core/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ def teck_talks(request):
2020
return render(request, 'core/tech_talks.html', {})
2121

2222

23+
def podcast(request):
24+
return render(request, 'core/podcast.html', {})
25+
26+
2327
@login_required
2428
def profile(request):
2529
return render(request, 'core/profile_detail.html', {})

0 commit comments

Comments
 (0)