test_models.py 587 Bytes
Newer Older
1 2 3 4
"""
Tests for the rss_proxy models
"""
from django.test import TestCase
5

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
from rss_proxy.models import WhitelistedRssUrl


class WhitelistedRssUrlTests(TestCase):
    """ Tests for the rss_proxy.WhitelistedRssUrl model """

    def setUp(self):
        super(WhitelistedRssUrlTests, self).setUp()
        self.whitelisted_rss_url = WhitelistedRssUrl.objects.create(url='http://www.example.com')

    def test_unicode(self):
        """
        Test the unicode function returns the url
        """
        self.assertEqual(unicode(self.whitelisted_rss_url), self.whitelisted_rss_url.url)