application: not use config.scan(), and replace all @add_view decorator into a explicit add_view call for faster app start.
This commit is contained in:
parent
9d122ba26f
commit
eb5ec20934
89 changed files with 2537 additions and 1706 deletions
|
|
@ -40,7 +40,7 @@ def route_path(name, params=None, **kwargs):
|
|||
|
||||
base_url = {
|
||||
'notifications_show_all': ADMIN_PREFIX + '/notifications',
|
||||
'notifications_mark_all_read': ADMIN_PREFIX + '/notifications/mark_all_read',
|
||||
'notifications_mark_all_read': ADMIN_PREFIX + '/notifications_mark_all_read',
|
||||
'notifications_show': ADMIN_PREFIX + '/notifications/{notification_id}',
|
||||
'notifications_update': ADMIN_PREFIX + '/notifications/{notification_id}/update',
|
||||
'notifications_delete': ADMIN_PREFIX + '/notifications/{notification_id}/delete',
|
||||
|
|
@ -60,6 +60,15 @@ class TestNotificationsController(TestController):
|
|||
Session().delete(inst)
|
||||
Session().commit()
|
||||
|
||||
def test_mark_all_read(self, user_util):
|
||||
user = user_util.create_user(password='qweqwe')
|
||||
self.log_user(user.username, 'qweqwe')
|
||||
|
||||
self.app.post(
|
||||
route_path('notifications_mark_all_read'), status=302,
|
||||
params={'csrf_token': self.csrf_token}
|
||||
)
|
||||
|
||||
def test_show_all(self, user_util):
|
||||
user = user_util.create_user(password='qweqwe')
|
||||
user_id = user.user_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue