~ubuntu-branches/ubuntu/quantal/python-django/quantal

« back to all changes in this revision

Viewing changes to django/contrib/auth/tests/tokens.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2009-07-29 11:26:28 UTC
  • mfrom: (1.1.8 upstream) (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090729112628-pg09ino8sz0sj21t
Tags: 1.1-1
* New upstream release.
* Merge from experimental:
  - Ship FastCGI initscript and /etc/default file in python-django's examples
    directory (Closes: #538863)
  - Drop "05_10539-sphinx06-compatibility.diff"; it has been applied
    upstream.
  - Bump Standards-Version to 3.8.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
>>> p0.check_token(u, tk1)
9
9
True
10
10
 
 
11
>>> u = User.objects.create_user('comebackkid', 'test3@example.com', 'testpw')
 
12
>>> p0 = PasswordResetTokenGenerator()
 
13
>>> tk1 = p0.make_token(u)
 
14
>>> reload = User.objects.get(username='comebackkid')
 
15
>>> tk2 = p0.make_token(reload)
 
16
>>> tk1 == tk2
 
17
True
 
18
 
11
19
Tests to ensure we can use the token after n days, but no greater.
12
20
Use a mocked version of PasswordResetTokenGenerator so we can change
13
21
the value of 'today'