##// 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 182 class EmailNotificationModel(BaseModel):
183 183
184 TYPE_CHANGESET_COMMENT = 'changeset_comment'
184 TYPE_CHANGESET_COMMENT = Notification.TYPE_CHANGESET_COMMENT
185 185 TYPE_PASSWORD_RESET = 'passoword_link'
186 TYPE_REGISTRATION = 'registration'
186 TYPE_REGISTRATION = Notification.TYPE_REGISTRATION
187 187 TYPE_DEFAULT = 'default'
188 188
189 189 def __init__(self):
@@ -204,7 +204,7 b' class EmailNotificationModel(BaseModel):'
204 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 208 email_template = self._tmpl_lookup.get_template(base)
209 209 # translator inject
210 210 _kwargs = {'_':_}
@@ -76,7 +76,10 b' class TestForksController(TestController'
76 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 83 response = self.app.get(url(controller='summary', action='index',
81 84 repo_name=fork_name))
82 85
@@ -1,12 +1,19 b''
1 1 # -*- coding: utf-8 -*-
2 2 from rhodecode.tests import *
3 from rhodecode.model.db import User
3 from rhodecode.model.db import User, Notification
4 4 from rhodecode.lib import generate_api_key
5 5 from rhodecode.lib.auth import check_password
6
6 from rhodecode.model.meta import Session
7 7
8 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 17 def test_index(self):
11 18 response = self.app.get(url(controller='login', action='index'))
12 19 self.assertEqual(response.status, '200 OK')
General Comments 0
You need to be logged in to leave comments. Login now