예제 #1
0
    def test_site(self):
        """
        Create a :py:mod:`feeds.models.WebSite` Object and verify
        it functions properly.

        .. todo:
            A better Test for the WebSite model.
        """

        from feeds.models import WebSite
        s = WebSite(website_url="https://pramari.de/")
        s.save()
        self.assertEqual(str(s.website_url), "https://pramari.de/")
        """Assert the __str__ representation equals the site-name."""
예제 #2
0
    def setUp(self):
        """
        Set up environment.
        """
        from feeds.models import WebSite
        site = WebSite(website_url="http://pramari.de/")
        site.save()
        self.site_id = site.pk
        """Test WebSite."""

        self.client = Client()
        """Test Client."""

        self.factory = RequestFactory()
        """Test Client."""
예제 #3
0
    def setUp(self):
        """
        Set up environment.
        """
        from feeds.models import WebSite
        site = WebSite(url="https://angry-planet.com/")
        site.save()
        self.site_id = site.pk
        """Test WebSite."""

        self.client = Client()
        """Test Client."""

        self.factory = RequestFactory()
        """Test Client."""
예제 #4
0
    def setUp(self):
        """
        Set up environment.
        """
        from feeds.models import WebSite
        site = WebSite(website_url="http://pramari.de/")
        site.save()
        self.site_id = site.pk
        """Test WebSite."""

        self.client = Client()
        """Test Client."""

        self.factory = RequestFactory()
        """Test Client."""
예제 #5
0
    def test_site(self):
        """
        Create a :py:mod:`feeds.models.WebSite` Object and verify
        it functions properly.
        """

        from feeds.models import WebSite
        s = WebSite(url="https://angry-planet.com/")
        s.save()
        # self.assertContains( s.get_absolute_url(), s.pk)
        """
        .. todo:: self.assertContains won't work
        for what is being tested here.
        """
        self.assertEqual(str(s), "https://angry-planet.com/")
        """Assert the __str__ representation equals the site-name."""