src/cm/tests/test_registration.py
author gibus
Mon, 21 May 2012 16:50:42 +0200
changeset 439 8994d24e4b2f
parent 305 df2c3202fd8e
permissions -rw-r--r--
Reverts to changeset 435, and just add {% csrf_token %} to template forgot_pw.html, since CSRF protection seems to be only here (surely because of django.contrib.auth.views).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
305
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
     1
from django.test import TestCase
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
     2
from django.test.client import Client
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
     3
from django.core import management
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
     4
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
     5
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
     6
from cm.models import *
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
     7
from cm.security import *
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
     8
from cm.tests.test_comment_positioning import create_comment
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
     9
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
    10
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
    11
class RegistrationTest(TestCase):
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
    12
    fixtures = ['roles_generic','test_content']
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
    13
    
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
    14
    def test_registration(self):
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
    15
        user = UserProfile.objects.create_inactive_user('no@noreply', False)
df2c3202fd8e do not lock table with backends other than postgresql (postgresql specific syntax) (fixes #52)
raph
parents:
diff changeset
    16