1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# HG changeset patch
# User Rafael G. Martins <rafael@rafaelmartins.eng.br>
# Date 1326030133 7200
# Node ID bb6ae530f3475d08a1bbe04dd4b23fe29597a26c
# Parent 2133cc744722cf0bbe061c2958dd00a831c7b0e2
fix tests for python 2.6
diff -r 2133cc744722 -r bb6ae530f347 blohg/testsuite.py
--- a/blohg/testsuite.py Thu Jan 05 22:39:04 2012 -0200
+++ b/blohg/testsuite.py Sun Jan 08 11:42:13 2012 -0200
@@ -146,8 +146,8 @@
app = create_app(self.repo_path)
with app.test_request_context():
- with self.assertRaises(TemplateNotFound):
- app.jinja_loader.get_source(app.jinja_env, 'test.html')
+ self.assertRaises(TemplateNotFound, app.jinja_loader.get_source,
+ app.jinja_env, 'test.html')
new_file = os.path.join(self.repo_path, app.config['TEMPLATES_DIR'],
'test.html')
@@ -158,8 +158,8 @@
app.hg.reload()
with app.test_request_context():
- with self.assertRaises(TemplateNotFound):
- app.jinja_loader.get_source(app.jinja_env, 'test.html')
+ self.assertRaises(TemplateNotFound, app.jinja_loader.get_source,
+ app.jinja_env, 'test.html')
app.debug = True
app.hg.reload()
|