Notifications regression: Notifications not created
Notifications for when someone posted a comment on your node was not created. Root cause was that default values defined in schema was not set, resulting in activity subscriptions not being active. There were 2 bugs preventing them to be set: * The way the caching of markdown as html was implemented caused default values not to be set. * Eve/Cerberus regression causes nested default values to fail https://github.com/pyeve/eve/issues/1174 Also, a 3rd bug caused nodes without a parent not to have a subscription. Migration scripts: How markdown fields is cached has changed, and unused properties of attachments has been removed. ./manage.py maintenance replace_pillar_node_type_schemas Set the default values of activities-subscription ./manage.py maintenance fix_missing_activities_subscription_defaults
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
"""Unit test for SVN interface."""
|
||||
|
||||
import collections
|
||||
import datetime
|
||||
import logging.config
|
||||
import unittest
|
||||
from time import sleep
|
||||
|
||||
from bson import ObjectId
|
||||
from dateutil.tz import tzutc
|
||||
@@ -391,6 +391,12 @@ class SvnTaskLoggedTest(AbstractAttractTest):
|
||||
with self.app.test_request_context():
|
||||
_, token = cli.create_svner_account('svner@example.com', self.project['url'])
|
||||
|
||||
# !! UGLY !!
|
||||
# The '_created' timestamp resolution is to low. Therefor both created and commit activity can get the same
|
||||
# created timestamp, and then the ordering of activities is non-deterministic.
|
||||
# So lets slow things down a little.
|
||||
sleep(0.001)
|
||||
|
||||
# Do the push
|
||||
msg = '¡is a tie! commit to task [%s]' % shortcode
|
||||
self.post('/attract/api/%s/subversion/log' % self.project['url'],
|
||||
|
Reference in New Issue
Block a user