##// END OF EJS Templates
fixes timezone issues with tests
marcink -
r1707:54fda6ce beta
parent child Browse files
Show More
@@ -8,6 +8,7 b' This module initializes the application '
8 setup-app`) and provides the base testing objects.
8 setup-app`) and provides the base testing objects.
9 """
9 """
10 import os
10 import os
11 import time
11 from os.path import join as jn
12 from os.path import join as jn
12
13
13 from unittest import TestCase
14 from unittest import TestCase
@@ -20,11 +21,13 b' from webtest import TestApp'
20
21
21 from rhodecode.model import meta
22 from rhodecode.model import meta
22 import logging
23 import logging
24 import pylons.test
25
26 os.environ['TZ'] = 'UTC'
27 time.tzset()
23
28
24 log = logging.getLogger(__name__)
29 log = logging.getLogger(__name__)
25
30
26 import pylons.test
27
28 __all__ = ['environ', 'url', 'TestController', 'TESTS_TMP_PATH', 'HG_REPO',
31 __all__ = ['environ', 'url', 'TestController', 'TESTS_TMP_PATH', 'HG_REPO',
29 'GIT_REPO', 'NEW_HG_REPO', 'NEW_GIT_REPO', 'HG_FORK', 'GIT_FORK',
32 'GIT_REPO', 'NEW_HG_REPO', 'NEW_GIT_REPO', 'HG_FORK', 'GIT_FORK',
30 'TEST_USER_ADMIN_LOGIN', 'TEST_USER_ADMIN_PASS' ]
33 'TEST_USER_ADMIN_LOGIN', 'TEST_USER_ADMIN_PASS' ]
@@ -12,8 +12,9 b' class TestChangelogController(TestContro'
12 self.assertTrue("""<input class="changeset_range" id="5e204e7583b9" """
12 self.assertTrue("""<input class="changeset_range" id="5e204e7583b9" """
13 """name="5e204e7583b9" type="checkbox" value="1" />"""
13 """name="5e204e7583b9" type="checkbox" value="1" />"""
14 in response.body)
14 in response.body)
15 self.assertTrue("""<span>commit 154: 5e204e7583b9@2010-08-10 """
15 self.assertTrue("""<span>commit 154: 5e204e7583b9@2010-08-09 """
16 """02:18:46</span>""" in response.body)
16 """23:18:46</span>""" in response.body)
17
17 self.assertTrue("""Small update at simplevcs app""" in response.body)
18 self.assertTrue("""Small update at simplevcs app""" in response.body)
18
19
19
20
@@ -23,7 +24,6 b' class TestChangelogController(TestContro'
23 """show more details">3</span>""" in response.body)
24 """show more details">3</span>""" in response.body)
24
25
25 #pagination
26 #pagination
26
27 response = self.app.get(url(controller='changelog', action='index',
27 response = self.app.get(url(controller='changelog', action='index',
28 repo_name=HG_REPO), {'page':1})
28 repo_name=HG_REPO), {'page':1})
29 response = self.app.get(url(controller='changelog', action='index',
29 response = self.app.get(url(controller='changelog', action='index',
@@ -42,8 +42,8 b' class TestChangelogController(TestContro'
42 self.assertTrue("""<input class="changeset_range" id="46ad32a4f974" """
42 self.assertTrue("""<input class="changeset_range" id="46ad32a4f974" """
43 """name="46ad32a4f974" type="checkbox" value="1" />"""
43 """name="46ad32a4f974" type="checkbox" value="1" />"""
44 in response.body)
44 in response.body)
45 self.assertTrue("""<span>commit 64: 46ad32a4f974@2010-04-20"""
45 self.assertTrue("""<span>commit 64: 46ad32a4f974@2010-04-19"""
46 """ 01:33:21</span>"""in response.body)
46 """ 22:33:21</span>"""in response.body)
47
47
48 self.assertTrue("""<span id="46ad32a4f974e45472a898c6b0acb600320"""
48 self.assertTrue("""<span id="46ad32a4f974e45472a898c6b0acb600320"""
49 """579b1" class="changed_total tooltip" """
49 """579b1" class="changed_total tooltip" """
@@ -53,9 +53,3 b' class TestChangelogController(TestContro'
53 """46ad32a4f974e45472a898c6b0acb600320579b1">"""
53 """46ad32a4f974e45472a898c6b0acb600320579b1">"""
54 """Merge with 2e6a2bf9356ca56df08807f4ad86d48"""
54 """Merge with 2e6a2bf9356ca56df08807f4ad86d48"""
55 """0da72a8f4</a></div>""" % HG_REPO in response.body)
55 """0da72a8f4</a></div>""" % HG_REPO in response.body)
56
57
58
59 #def test_index_git(self):
60 # self.log_user()
61 # response = self.app.get(url(controller='changelog', action='index', repo_name=GIT_REPO))
General Comments 0
You need to be logged in to leave comments. Login now