test_udlistview.py 569 Bytes
Newer Older
luxcem's avatar
luxcem committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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