src/cm/tests/test_history.py
author Simon Descarpentries <sid@sopinspace.com>
Wed, 09 May 2012 17:13:33 +0200
changeset 417 c5e91f204371
parent 278 3d25afbd78ff
permissions -rw-r--r--
After investigations, commit the proposed patch by kklimonda presented with the following introduction : cm/templates/site/login_form.html template uses a relative url for the form action, which seems to break deployment in the subfolder when trailing slash is missing (the form redirects to the upper folder breaking login). Using {% url login %} (as in the attached patch) instead would fix the issue.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     1
from django.test import TestCase
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     2
from django.test.client import Client
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     3
from django.core import management
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     4
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     5
from cm.models import *
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     6
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     7
class HistoryTest(TestCase):
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     8
    fixtures = ['test_comments',]
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     9
    
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    10
    def test_revert(self):
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    11
        text = Text.objects.all()[0]
278
3d25afbd78ff fix unit tests
raph
parents: 145
diff changeset
    12
        text_version = text.last_text_version
145
fb5b1e6ad179 refactor version explorer
raph
parents: 0
diff changeset
    13
        text.revert_to_version(text_version.key)
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    14