##// END OF EJS Templates
test fixes
marcink -
r1732:8321b3d1 beta
parent child Browse files
Show More
@@ -181,9 +181,9 b' class NotificationModel(BaseModel):'
181
181
182 class EmailNotificationModel(BaseModel):
182 class EmailNotificationModel(BaseModel):
183
183
184 TYPE_CHANGESET_COMMENT = 'changeset_comment'
184 TYPE_CHANGESET_COMMENT = Notification.TYPE_CHANGESET_COMMENT
185 TYPE_PASSWORD_RESET = 'passoword_link'
185 TYPE_PASSWORD_RESET = 'passoword_link'
186 TYPE_REGISTRATION = 'registration'
186 TYPE_REGISTRATION = Notification.TYPE_REGISTRATION
187 TYPE_DEFAULT = 'default'
187 TYPE_DEFAULT = 'default'
188
188
189 def __init__(self):
189 def __init__(self):
@@ -204,7 +204,7 b' class EmailNotificationModel(BaseModel):'
204 :param type_:
204 :param type_:
205 """
205 """
206
206
207 base = self.email_types.get(type_, self.TYPE_DEFAULT)
207 base = self.email_types.get(type_, self.email_types[self.TYPE_DEFAULT])
208 email_template = self._tmpl_lookup.get_template(base)
208 email_template = self._tmpl_lookup.get_template(base)
209 # translator inject
209 # translator inject
210 _kwargs = {'_':_}
210 _kwargs = {'_':_}
@@ -76,7 +76,10 b' class TestForksController(TestController'
76 response = response.follow()
76 response = response.follow()
77
77
78
78
79 #check if fork is marked as fork
79 # check if fork is marked as fork
80 # wait for cache to expire
81 import time
82 time.sleep(10)
80 response = self.app.get(url(controller='summary', action='index',
83 response = self.app.get(url(controller='summary', action='index',
81 repo_name=fork_name))
84 repo_name=fork_name))
82
85
@@ -1,12 +1,19 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 from rhodecode.tests import *
2 from rhodecode.tests import *
3 from rhodecode.model.db import User
3 from rhodecode.model.db import User, Notification
4 from rhodecode.lib import generate_api_key
4 from rhodecode.lib import generate_api_key
5 from rhodecode.lib.auth import check_password
5 from rhodecode.lib.auth import check_password
6
6 from rhodecode.model.meta import Session
7
7
8 class TestLoginController(TestController):
8 class TestLoginController(TestController):
9
9
10 def tearDown(self):
11 for n in Notification.query().all():
12 Session().delete(n)
13
14 Session().commit()
15 self.assertEqual(Notification.query().all(), [])
16
10 def test_index(self):
17 def test_index(self):
11 response = self.app.get(url(controller='login', action='index'))
18 response = self.app.get(url(controller='login', action='index'))
12 self.assertEqual(response.status, '200 OK')
19 self.assertEqual(response.status, '200 OK')
General Comments 0
You need to be logged in to leave comments. Login now