~ubuntu-branches/ubuntu/oneiric/python-django/oneiric-201108291626

« back to all changes in this revision

Viewing changes to tests/regressiontests/model_permalink/tests.py

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski, Chris Lamb, Piotr Ożarowski
  • Date: 2011-05-02 22:23:37 UTC
  • mfrom: (1.1.14 upstream) (4.4.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110502222337-bhlfr6gr1l1cj7dn
Tags: 1.3-2
* Team upload.

[ Chris Lamb ]
* Don't remove "backup~" test file - upstream did ship it; we were just
  removing it with dh_clean.

[ Piotr Ożarowski ]
* Fix builds with non-default Python versions installed
* Bump Standards-Version to 3.9.2 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from django.test import TestCase
 
2
from regressiontests.model_permalink.models import Guitarist
 
3
 
 
4
class PermalinkTests(TestCase):
 
5
    urls = 'regressiontests.model_permalink.urls'
 
6
 
 
7
    def test_permalink(self):
 
8
        g = Guitarist(name='Adrien Moignard', slug='adrienmoignard')
 
9
        self.assertEqual(g.url(), '/guitarists/adrienmoignard/')
 
10
 
 
11
    def test_wrapped_docstring(self):
 
12
        "Methods using the @permalink decorator retain their docstring."
 
13
        g = Guitarist(name='Adrien Moignard', slug='adrienmoignard')
 
14
        self.assertEqual(g.url.__doc__, "Returns the URL for this guitarist.")