Commit db694f8d authored by luxcem's avatar luxcem

fix urls reverse

parent 88a40a90
...@@ -6,17 +6,17 @@ ...@@ -6,17 +6,17 @@
<div class="col-md-12 white-bg"> <div class="col-md-12 white-bg">
<ul class="nav nav-integrated"> <ul class="nav nav-integrated">
<li class="nav-item{% if filter_view == 'flux' %} active{% endif %}"> <li class="nav-item{% if filter_view == 'flux' %} active{% endif %}">
<a class="nav-link" href="{% url 'article-list' filter_view='flux'%}"> <a class="nav-link" href="{% url 'rp:article-list' filter_view='flux'%}">
Flux <img style="width: 2rem; margin-left: 0.5rem;" src="/static/img/cochon-01.png" alt=""> Flux <img style="width: 2rem; margin-left: 0.5rem;" src="/static/img/cochon-01.png" alt="">
</a> </a>
</li> </li>
<li class="nav-item {% if filter_view == 'draft' %} active{% endif %}"> <li class="nav-item {% if filter_view == 'draft' %} active{% endif %}">
<a class="nav-link" href="{% url 'article-list' filter_view='draft'%}"> <a class="nav-link" href="{% url 'rp:article-list' filter_view='draft'%}">
En attente <span class="badge badge-default">{{nb_draft}}</span> En attente <span class="badge badge-default">{{nb_draft}}</span>
</a> </a>
</li> </li>
<li class="nav-item {% if filter_view == 'published' %} active{% endif %}"> <li class="nav-item {% if filter_view == 'published' %} active{% endif %}">
<a class="nav-link" href="{% url 'article-list' filter_view='published'%}">Publiés</a> <a class="nav-link" href="{% url 'rp:article-list' filter_view='published'%}">Publiés</a>
</li> </li>
</ul> </ul>
......
from django.urls import reverse
from django.test import TestCase
from userprofile.factories import ProfileFactory
from rp.factories import ArticleFactory
# from rp.models import Article
class ArticleListTestCase(TestCase):
def setUp(self):
self.article = ArticleFactory()
self.profile = ProfileFactory()
self.user = self.profile.user
self.client.force_login(self.user)
def test_votes(self):
url_list = reverse("rp:article-list")
response = self.client.get(url_list)
assert response.status_code == 200
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment