Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
2 parents afc1a7e + 83258a7 commit ef36990f64f03dcd7f8e20f340c7adaafcd40a0d @ericrasmussen ericrasmussen committed Apr 27, 2012
Showing with 18 additions and 3 deletions.
  1. +7 −2 substanced/form/__init__.py
  2. +2 −0 substanced/principal/__init__.py
  3. +9 −1 substanced/principal/tests/test_principal.py
@@ -25,14 +25,19 @@
},
'jquery.form': {
None:{
- 'js':'deform:static/scripts/jquery.form.js',
+ 'js':'deform:static/scripts/jquery.form-3.09.js',
},
},
'jquery.maskedinput': {
None:{
'js':'deform:static/scripts/jquery.maskedinput-1.2.2.min.js',
},
},
+ 'jquery.maskMoney': {
+ None:{
+ 'js':'deform:static/scripts/jquery.maskMoney-1.4.1.js',
+ },
+ },
'datetimepicker': {
None:{
'js':'deform:static/scripts/jquery-ui-timepicker-addon.js',
@@ -41,7 +46,7 @@
},
'deform': {
None:{
- 'js':('deform:static/scripts/jquery.form.js',
+ 'js':('deform:static/scripts/jquery.form-3.09.js',
'deform:static/scripts/deform.js',
'deform_bootstrap:static/deform_bootstrap.js'),
'css':'deform:static/css/form.css',
@@ -398,6 +398,8 @@ def commit_suicide(self):
def user_will_be_removed(user, event):
""" Remove all password reset objects associated with a user when the user
is removed """
+ if event.moving: # it's not really being removed
+ return
objectmap = find_service(user, 'objectmap')
if objectmap is not None:
resets = objectmap.targets(user, UserToPasswordReset)
@@ -535,8 +535,16 @@ def commit_suicide():
parent['__services__'] = services
parent['user'] = user
services['objectmap'] = objectmap
- self._callFUT(user, None)
+ event = testing.DummyResource()
+ event.moving = False
+ self._callFUT(user, event)
self.assertTrue(reset.committed)
+
+ def test_it_moving(self):
+ user = None
+ event = testing.DummyResource()
+ event.moving = True
+ self.assertEqual(None, self._callFUT(user, event))
from ...interfaces import IFolder

0 comments on commit ef36990

Please sign in to comment.